UNPKG

galeforce-tmp-sea

Version:

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

30 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TakesQueue = void 0; /** * A mixin for the `.queue()` method. * @template TQueue The type of the queue. Specified by the type of the `type` parameter. * @template TBase The type of the object inside. * @param type A dummy parameter to allow for type inference. Use by passing in `<T>{}` or * an expression of that form. * @param Base The target class. */ function TakesQueue(type, Base) { return class extends Base { /** * Modifies the **queue** associated with the Action object it is called from. * Note that associated runtime type checks are performed to ensure that * the provided queue matches one of the expected queues for the corresponding game. * @param queue The queue to update the calling Action object with. * @throws Will throw an error if an invalid queue is provided or the provided * queue fails the runtime type check. */ queue(queue) { this.payload.queue = queue; this.queue = undefined; return this; } }; } exports.TakesQueue = TakesQueue; //# sourceMappingURL=queue.js.map