UNPKG

galeforce-tmp-sea

Version:

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

32 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TakesRiotId = void 0; /** * 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. */ function TakesRiotId(Base) { return class extends Base { /** * 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(gameName) { this.payload.gameName = gameName; this.gameName = undefined; return this; } /** * 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(tagLine) { this.payload.tagLine = tagLine; delete this.tagLine; return this; } }; } exports.TakesRiotId = TakesRiotId; //# sourceMappingURL=riot-id.js.map