diff --git a/common/js/types.d.ts b/common/js/types.d.ts index ae2c71465..a883c6923 100644 --- a/common/js/types.d.ts +++ b/common/js/types.d.ts @@ -16,7 +16,6 @@ export declare type IDStrings = "iidx:SP" | "iidx:DP" | "popn:9B" | "sdvx:Single * IDString is a member of IDStrings. You're free to attempt to * rewrite IDStrings to try and get this to work, I promise you it doesn't. */ -export declare type IDString = `${G}:${P}`; /** * All MongoDB Documents require this field, or atleast they all have them in ktchi's DB. */ @@ -242,7 +241,7 @@ export interface MRGFolderTarget { field: MRGFolderTargetFieldNames; target: number; } -export interface MRGFolderInformation> { +export interface MRGFolderInformation { folderID: string; difficulty: Difficulties[I][] | null; datapoints: MRGFolderTarget[]; @@ -456,7 +455,7 @@ export interface IIDXEamusementScoreDocument extends MongoDBDocument { score: integer; ranking: integer; } -export interface ChartDocument> extends MongoDBDocument { +export interface ChartDocument extends MongoDBDocument { chartID: string; id: integer; level: string; @@ -484,7 +483,7 @@ export interface TierlistDocument extends MongoDBDocument { grades?: [string, number][]; }; } -export interface TierlistDataDocument> extends MongoDBDocument { +export interface TierlistDataDocument extends MongoDBDocument { playtype: P; songID: integer; difficulty: Difficulties[I]; @@ -684,7 +683,7 @@ export interface GameSpecificCalcLookup { "gitadora:Gita": never; "gitadora:Dora": never; } -export interface ScoreDocument> extends MongoDBDocument { +export interface ScoreDocument extends MongoDBDocument { service: string; game: G; playtype: P; diff --git a/common/src/types.ts b/common/src/types.ts index bad909c75..0f366727d 100644 --- a/common/src/types.ts +++ b/common/src/types.ts @@ -33,7 +33,7 @@ export type IDStrings = * IDString is a member of IDStrings. You're free to attempt to * rewrite IDStrings to try and get this to work, I promise you it doesn't. */ -export type IDString = `${G}:${P}`; +// export type IDString = `${G}:${P}`; /** * All MongoDB Documents require this field, or atleast they all have them in ktchi's DB. @@ -373,12 +373,7 @@ export interface MRGFolderTarget { target: number; } -export interface MRGFolderInformation< - G extends Game = Game, - P extends Playtypes[G] = Playtypes[G], - // @ts-expect-error known bug with IDString or TS. - I extends IDStrings = IDString -> { +export interface MRGFolderInformation { folderID: string; difficulty: Difficulties[I][] | null; datapoints: MRGFolderTarget[]; @@ -650,8 +645,7 @@ export interface IIDXEamusementScoreDocument extends MongoDBDocument { export interface ChartDocument< G extends Game = Game, P extends Playtypes[G] = Playtypes[G], - // @ts-expect-error known bug with IDString or TS. - I extends IDStrings = IDString + I extends IDStrings = IDStrings > extends MongoDBDocument { chartID: string; id: integer; @@ -686,8 +680,7 @@ export interface TierlistDocument extends MongoDBDocument { export interface TierlistDataDocument< G extends Game = Game, P extends Playtypes[G] = Playtypes[G], - // @ts-expect-error known bug with IDString or TS. - I extends IDStrings = IDString + I extends IDStrings = IDStrings > extends MongoDBDocument { playtype: P; // doesn't need to exist. songID: integer; @@ -934,9 +927,7 @@ export interface GameSpecificCalcLookup { export interface ScoreDocument< G extends Game = Game, P extends Playtypes[G] = Playtypes[G], - // @ts-expect-error Typescript thinks this is illegal. - // It *ABSOLUTELY* isn't. - I extends IDStrings = IDString + I extends IDStrings = IDStrings > extends MongoDBDocument { service: string; game: G;