mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 19:15:52 +02:00
refactor: make noImplicitAny true (#17083)
* wip * Update emojis.emoji.vue * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update manager.ts * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update analytics.ts
This commit is contained in:
@@ -52,6 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onUnmounted, reactive, ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { useWidgetPropsManager } from './widget.js';
|
||||
import type { WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
|
||||
import type { FormWithDefault, GetFormResultType } from '@/utility/form.js';
|
||||
@@ -116,20 +117,22 @@ if (prefer.s['sound.masterVolume']) {
|
||||
}
|
||||
|
||||
for (const domain of ['inbox', 'deliver']) {
|
||||
prev[domain] = deepClone(current[domain]);
|
||||
const d = domain as 'inbox' | 'deliver';
|
||||
prev[d] = deepClone(current[d]);
|
||||
}
|
||||
|
||||
const onStats = (stats) => {
|
||||
const onStats = (stats: Misskey.entities.QueueStats) => {
|
||||
for (const domain of ['inbox', 'deliver']) {
|
||||
prev[domain] = deepClone(current[domain]);
|
||||
current[domain].activeSincePrevTick = stats[domain].activeSincePrevTick;
|
||||
current[domain].active = stats[domain].active;
|
||||
current[domain].waiting = stats[domain].waiting;
|
||||
current[domain].delayed = stats[domain].delayed;
|
||||
const d = domain as 'inbox' | 'deliver';
|
||||
prev[d] = deepClone(current[d]);
|
||||
current[d].activeSincePrevTick = stats[d].activeSincePrevTick;
|
||||
current[d].active = stats[d].active;
|
||||
current[d].waiting = stats[d].waiting;
|
||||
current[d].delayed = stats[d].delayed;
|
||||
|
||||
if (current[domain].waiting > 0 && widgetProps.sound && jammedAudioBuffer.value && !jammedSoundNodePlaying.value) {
|
||||
if (current[d].waiting > 0 && widgetProps.sound && jammedAudioBuffer.value && !jammedSoundNodePlaying.value) {
|
||||
const soundNode = sound.createSourceNode(jammedAudioBuffer.value, {}).soundSource;
|
||||
if (soundNode) {
|
||||
if (soundNode != null) {
|
||||
jammedSoundNodePlaying.value = true;
|
||||
soundNode.onended = () => jammedSoundNodePlaying.value = false;
|
||||
soundNode.start();
|
||||
@@ -138,7 +141,7 @@ const onStats = (stats) => {
|
||||
}
|
||||
};
|
||||
|
||||
const onStatsLog = (statsLog) => {
|
||||
const onStatsLog = (statsLog: Misskey.entities.QueueStatsLog) => {
|
||||
for (const stats of [...statsLog].reverse()) {
|
||||
onStats(stats);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user