UNPKG

galeforce-tmp-sea

Version:

A customizable, promise-based, and command-oriented TypeScript library for the Riot Games API.

25 lines 1.19 kB
import { Constructor, Executable } from './executable'; /** * An interface containing method type signatures for any `.ddragon` Action containing a `.locale()` method. */ export interface LocaleChainable { locale?: <K extends LocaleChainable & Executable>(this: K, locale: string) => Omit<K, 'locale'>; } /** * A mixin for the `.locale()` method. * @template TBase The type of the object inside. Inferred from the `Base` parameter. * @param Base The target class. */ export declare function TakesLocale<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** * Modifies the **locale** (language) associated with the Action object it is called from. * The regex `/^[a-z]{2}_[A-Z]{2}$/` will be run against the provided input to ensure that * a valid locale format is provided. * @param locale The locale to update the calling Action object with. * @throws Will throw an error if the provided locale does not match the above regex expression. */ locale<K extends LocaleChainable & Executable>(this: K, locale: string): Omit<K, "locale">; }; } & TBase; //# sourceMappingURL=locale.d.ts.map