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