lol-constants
Version:
League of Legends constants, functions, and types. Provides a plathera of functions to easily convert between ID, Name, and Key for champions, items, summoner spells, and runes.
8 lines (7 loc) • 705 B
TypeScript
import { ChampionId, ChampionKey, ChampionName, Champions } from '../objects/generated/Champions';
/** Get a champion by its **id**, **key**, or **name**. */
export declare function getChampion(id_key_name: ChampionId | ChampionKey | ChampionName): typeof Champions[keyof typeof Champions];
export declare function isChampionId(id: number | null | undefined): id is ChampionId;
export declare function isChampionKey(key: string | null | undefined): key is ChampionKey;
export declare function isChampionName(name: string | null | undefined): name is ChampionName;
export declare function isChampion(id_key_name: number | string | null | undefined): id_key_name is ChampionId | ChampionKey | ChampionName;