- Preparing search index...
- The search index is not available
yatter
- once<F, T>(fun: F, option?: {
lastResult?: T;
}): (<C>(this: C, ...args: Parameters<F>) => FunctionReturn)
-
Type Parameters
-
F extends AnyFunction<any>
-
T extends undefined | boolean = true
Parameters
-
fun: F
-
option: {
lastResult?: T;
} = {}
Returns (<C>(this: C, ...args: Parameters<F>) => FunctionReturn)
-
- <C>(this: C, ...args: Parameters<F>): FunctionReturn
-
Parameters
-
this: C
-
Rest
...args: Parameters<F>
Returns FunctionReturn
只能调用一次的函数,
Returns