1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-25 23:44:01 +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:
syuilo
2026-01-09 22:06:40 +09:00
committed by GitHub
parent 2a14025c29
commit 41592eafb3
233 changed files with 966 additions and 963 deletions

View File

@@ -308,7 +308,7 @@ if (!props.game.isEnded) {
}, TIMER_INTERVAL_SEC * 1000, { immediate: false, afterMounted: true });
}
async function onStreamLog(log) {
async function onStreamLog(log: Reversi.Serializer.Log & { id: string | null }) {
game.value.logs = Reversi.Serializer.serializeLogs([
...Reversi.Serializer.deserializeLogs(game.value.logs),
log,
@@ -348,7 +348,10 @@ async function onStreamLog(log) {
}
}
function onStreamEnded(x) {
function onStreamEnded(x: {
winnerId: Misskey.entities.User['id'] | null;
game: Misskey.entities.ReversiGameDetailed;
}) {
game.value = deepClone(x.game);
if (game.value.winnerId === $i.id) {
@@ -384,7 +387,7 @@ function checkEnd() {
}
}
function restoreGame(_game) {
function restoreGame(_game: Misskey.entities.ReversiGameDetailed) {
game.value = deepClone(_game);
engine.value = Reversi.Serializer.restoreGame({

View File

@@ -113,6 +113,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { computed, watch, ref, onMounted, shallowRef, onUnmounted } from 'vue';
import * as Misskey from 'misskey-js';
import * as Reversi from 'misskey-reversi';
import type { MenuItem } from '@/types/menu.js';
import { i18n } from '@/i18n.js';
import { ensureSignin } from '@/i.js';
import { deepClone } from '@/utility/clone.js';
@@ -121,7 +122,6 @@ import MkRadios from '@/components/MkRadios.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkFolder from '@/components/MkFolder.vue';
import * as os from '@/os.js';
import type { MenuItem } from '@/types/menu.js';
import { useRouter } from '@/router.js';
const $i = ensureSignin();
@@ -165,7 +165,7 @@ watch(() => game.value.timeLimitForEachTurn, () => {
updateSettings('timeLimitForEachTurn');
});
function chooseMap(ev: MouseEvent) {
function chooseMap(ev: PointerEvent) {
const menu: MenuItem[] = [];
for (const c of mapCategories) {
@@ -212,7 +212,10 @@ function unready() {
props.connection.send('ready', false);
}
function onChangeReadyStates(states) {
function onChangeReadyStates(states: {
user1: boolean;
user2: boolean;
}) {
game.value.user1Ready = states.user1;
game.value.user2Ready = states.user2;
}

View File

@@ -208,7 +208,7 @@ async function matchUser() {
matchHeatbeat();
}
async function matchAny(ev: MouseEvent) {
async function matchAny(ev: PointerEvent) {
const isLoggedIn = await pleaseLogin();
if (!isLoggedIn) return;
@@ -239,11 +239,11 @@ function cancelMatching() {
}
}
async function accept(user) {
async function accept(user: Misskey.entities.UserLite) {
const game = await misskeyApi('reversi/match', {
userId: user.id,
});
if (game) {
if (game != null) {
startGame(game);
}
}