mirror of
https://github.com/ApfelTeeSaft/LiveSplitOne.git
synced 2026-09-03 03:43:25 +00:00
Fix linter errors
This commit is contained in:
+2
-2
@@ -20,7 +20,7 @@ const gameIdToCategoriesPromises: Map<string, Promise<Category[]>> = new Map();
|
||||
const gameIdToGameInfoMap: Map<string, Game> = new Map();
|
||||
const gameIdToGameInfoPromises: Map<string, Promise<Game>> = new Map();
|
||||
const gameAndCategoryToLeaderboardPromises: Map<string, Promise<void>> = new Map();
|
||||
const gameAndCategoryToLeaderboardMap: Map<string, Array<Run<PlayersEmbedded>>> = new Map();
|
||||
const gameAndCategoryToLeaderboardMap: Map<string, Run<PlayersEmbedded>[]> = new Map();
|
||||
let gameListPromise: Option<Promise<void>> = null;
|
||||
let platformListPromise: Option<Promise<void>> = null;
|
||||
let regionListPromise: Option<Promise<void>> = null;
|
||||
@@ -61,7 +61,7 @@ export function getRegions(): Map<string, string> {
|
||||
return regionList;
|
||||
}
|
||||
|
||||
export function getLeaderboard(gameName: string, categoryName: string): Array<Run<PlayersEmbedded>> | undefined {
|
||||
export function getLeaderboard(gameName: string, categoryName: string): Run<PlayersEmbedded>[] | undefined {
|
||||
const key = JSON.stringify({ gameName, categoryName });
|
||||
return gameAndCategoryToLeaderboardMap.get(key);
|
||||
}
|
||||
|
||||
@@ -148,10 +148,10 @@ export interface Record {
|
||||
run: Run,
|
||||
}
|
||||
|
||||
export type PlayersNotEmbedded = Array<PlayerUserRef | PlayerGuest>;
|
||||
export type PlayersNotEmbedded = (PlayerUserRef | PlayerGuest)[];
|
||||
|
||||
export interface PlayersEmbedded {
|
||||
data: Array<PlayerUser | PlayerGuest>,
|
||||
data: (PlayerUser | PlayerGuest)[],
|
||||
}
|
||||
|
||||
export interface Run<PlayerEmbedding = PlayersNotEmbedded> {
|
||||
@@ -314,7 +314,7 @@ async function executePaginatedRequest<T>(uri: string): Promise<Page<T>> {
|
||||
return new Page(data as T[], next);
|
||||
}
|
||||
|
||||
export async function getGame(gameId: string, embeds?: Array<"variables">): Promise<Game> {
|
||||
export async function getGame(gameId: string, embeds?: "variables"[]): Promise<Game> {
|
||||
const parameters = [];
|
||||
if (embeds !== undefined) {
|
||||
parameters.push(`embed=${embeds.join(",")}`);
|
||||
@@ -349,7 +349,7 @@ export async function getCategories(gameId: string): Promise<Category[]> {
|
||||
export async function getLeaderboard(
|
||||
gameId: string,
|
||||
categoryId: string,
|
||||
embeds?: Array<"players">,
|
||||
embeds?: "players"[],
|
||||
): Promise<Leaderboard> {
|
||||
const parameters = [];
|
||||
if (embeds !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user