AquaNet: got typescript to stop yelling at me, it was driving me up a wall

This commit is contained in:
Galexion
2024-03-01 23:16:14 -05:00
parent e8958f5e53
commit db2a7208da
4 changed files with 10 additions and 8 deletions

View File

@@ -104,12 +104,14 @@ export interface MusicMeta {
composer: string, composer: string,
bpm: number, bpm: number,
ver: number, ver: number,
note: { notes: {
[key: number]: {
lv: number lv: number
designer: string designer: string
lv_id: number lv_id: number
notes: number notes: number
} }
} }
}
export type AllMusic = { [key: string]: MusicMeta } export type AllMusic = { [key: string]: MusicMeta }

View File

@@ -8,7 +8,7 @@
export let userId: any export let userId: any
userId = +userId userId = +userId
let ifError = null; let ifError: string | null;
if (!userId) console.error("No user ID provided") if (!userId) console.error("No user ID provided")

View File

@@ -8,7 +8,7 @@
title(`Ranking`); title(`Ranking`);
let d: { users: GenericRanking[] }; let d: { users: GenericRanking[] };
let ifError = null; let ifError: string | null;
Promise.all([GAME.ranking("mai2")]) Promise.all([GAME.ranking("mai2")])
.then(([users]) => { .then(([users]) => {
console.log(users) console.log(users)

View File

@@ -17,7 +17,7 @@
export let game: GameName export let game: GameName
game = game || "mai2" game = game || "mai2"
let calElement: HTMLElement let calElement: HTMLElement
let ifError = null let ifError: string | null;
title(`User ${username}`) title(`User ${username}`)
interface MusicAndPlay extends MusicMeta, GenericGamePlaylog {} interface MusicAndPlay extends MusicMeta, GenericGamePlaylog {}