UNPKG

enka-network-api

Version:

Enka-network API wrapper for Genshin Impact.

27 lines (26 loc) 840 B
import { EnkaClient } from "../../client/EnkaClient"; export interface ImageBaseUrl { url: string; regexList: RegExp[]; priority: number; format: "PNG" | "WEBP" | "JPG"; } export interface CustomImageBaseUrl extends ImageBaseUrl { /** * @param fileName fileName without extension * @returns fileName **with** extension */ customParser: (fileName: string) => string | null; } export declare class ImageAssets { readonly enka: EnkaClient; readonly name: string | null; readonly imageBaseUrl: ImageBaseUrl | null; readonly url: string | null; readonly isAvailable: boolean; constructor(name: string | null, enka: EnkaClient, maxPriority?: number); /** * @returns a new instance of ImageAssets with the another imageBaseUrl */ nextSource(): ImageAssets | null; }