UNPKG

galeforce-tmp-sea

Version:

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

27 lines 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TakesDivision = void 0; /** * A mixin for the `.division()` method. * @template TBase The type of the object inside. Defaults to `typeof Action`. * @param Base The target class. */ function TakesDivision(Base) { return class extends Base { /** * Modifies the **division** associated with the Action object it is called from. * Note that associated runtime type checks are performed to ensure that * the provided division matches one of the expected queues for the corresponding game. * @param division The division to update the calling Action object with. * @throws Will throw an error if an invalid division is provided or the provided * division fails the runtime type check. */ division(division) { this.payload.division = division; this.division = undefined; return this; } }; } exports.TakesDivision = TakesDivision; //# sourceMappingURL=division.js.map