- once<This, Args, Return>(fn, context?): ((this, ...args) => Return)
Type Parameters
- This
- Args extends any[]
- Return
Parameters
- fn: ((this, ...args) => Return)
Optional
context: ClassMethodDecoratorContext<This, ((this, ...args) => Return)>
Returns ((this, ...args) => Return)
A class method decorator that limits a method to be called only once. All subsequent calls will return the result of the first call.