galeforce-tmp-sea
Version:
A customizable, promise-based, and command-oriented TypeScript library for the Riot Games API.
29 lines • 1.39 kB
TypeScript
import { Constructor, Executable } from './executable';
/**
* An interface containing method type signatures for any Action containing a `.gameName()` method
* and `.tagLine()` method.
*/
export interface RiotIdChainable {
gameName?: <K extends RiotIdChainable & Executable>(this: K, gameName: string) => Omit<K, 'gameName'>;
tagLine?: <K extends RiotIdChainable & Executable>(this: K, tagLine: string) => Omit<K, 'tagLine'>;
}
/**
* A mixin for the `.gameName()` and `.tagLine()` methods.
* @template TBase The type of the object inside. Defaults to `typeof Action`.
* @param Base The target class.
*/
export declare function TakesRiotId<TBase extends Constructor>(Base: TBase): {
new (...args: any[]): {
/**
* Modifies the **gameName** associated with the Action object it is called from.
* @param gameName The Riot ID name to update the calling Action object with.
*/
gameName<K extends RiotIdChainable & Executable>(this: K, gameName: string): Omit<K, "gameName">;
/**
* Modifies the **tagLine** associated with the Action object it is called from.
* @param tagLine The Riot ID tag to update the calling Action object with.
*/
tagLine<K_1 extends RiotIdChainable & Executable>(this: K_1, tagLine: string): Omit<K_1, "tagLine">;
};
} & TBase;
//# sourceMappingURL=riot-id.d.ts.map