UNPKG

galeforce-tmp-sea

Version:

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

26 lines 925 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TakesQuery = void 0; /** * A mixin for the `.query()` method. * @template TQuery The type of the request query. 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 TakesQuery(type, Base) { return class extends Base { /** * Modifies the **query** associated with the Action object it is called from. * @param query The request query to update the calling Action object with. */ query(query) { this.payload.query = query; this.query = undefined; return this; } }; } exports.TakesQuery = TakesQuery; //# sourceMappingURL=query.js.map