galeforce-tmp-sea
Version:
A customizable, promise-based, and command-oriented TypeScript library for the Riot Games API.
27 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TakesGame = void 0;
/**
* A mixin for the `.game()` method.
* @template TBase The type of the object inside. Defaults to `typeof Action`.
* @param Base The target class.
*/
function TakesGame(Base) {
return class extends Base {
/**
* Modifies the **game** associated with the Action object it is called from.
* Note that associated runtime type checks are performed to ensure that
* the provided Riot game matches one of the expected queues for the corresponding game.
* @param game The Riot game to update the calling Action object with.
* @throws Will throw an error if an invalid game is provided or the provided
* game fails the runtime type check.
*/
game(game) {
this.payload.game = game;
this.game = undefined;
return this;
}
};
}
exports.TakesGame = TakesGame;
//# sourceMappingURL=game.js.map