UNPKG

galeforce-tmp-sea

Version:

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

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