Home > rc-js-util > Once
Method decorator. The target will be called only once, subsequent calls will return the first return.
Signature:
export declare function Once<TInstance extends object, TKey extends keyof TInstance>(target: TInstance, key: TKey, descriptor: PropertyDescriptor): void;
Parameter | Type | Description |
---|---|---|
target | TInstance | |
key | TKey | |
descriptor | PropertyDescriptor |
Returns:
void