1 | import { BiTypedDecoratorN } from './factory';
|
2 | /**
|
3 | * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.
|
4 | *
|
5 | * @param {...*} [args] Additional arguments to invoke the function with
|
6 | * @example
|
7 | *
|
8 | * class MyClass {
|
9 | * value = 100;
|
10 | *
|
11 | * @Defer()
|
12 | * add(a) {
|
13 | * this.value += a;
|
14 | * }
|
15 | * }
|
16 | *
|
17 | * const myClass = new MyClass();
|
18 | *
|
19 | * myClass.add(10);
|
20 | *
|
21 | * myClass.value; // => 100;
|
22 | *
|
23 | * setTimeout(() => {
|
24 | * myClass.value; // => 110;
|
25 | * }, 0);
|
26 | */
|
27 | export declare const Defer: BiTypedDecoratorN;
|
28 | export { Defer as defer };
|
29 | export default Defer;
|