1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var after = require("lodash/after");
|
4 | var factory_1 = require("./factory");
|
5 | var applicators_1 = require("./applicators");
|
6 | var decorator = factory_1.DecoratorFactory.createDecorator(new factory_1.DecoratorConfig(after, new applicators_1.PostValueApplicator(), { setter: true }));
|
7 | /**
|
8 | * The opposite of Before. This method creates a function that invokes once it's called n or more times.
|
9 | * This spans across all instances of the class instead of the instance.
|
10 | * @param {number} n The number of calls before the function is invoked.
|
11 | * @example
|
12 | *
|
13 | * class MyClass {
|
14 | * @AfterAll(2)
|
15 | * fn() {
|
16 | * return 10;
|
17 | * }
|
18 | * }
|
19 | *
|
20 | * const myClass = new MyClass();
|
21 | * const myClass2 = new MyClass();
|
22 | *
|
23 | * myClass.fn(); // => undefined
|
24 | * myClass.fn(); // => 10
|
25 | *
|
26 | * myClass2.fn(); // => 10
|
27 | * myClass2.fn(); // => 10
|
28 | */
|
29 | function AfterAll(n) {
|
30 | return decorator(n);
|
31 | }
|
32 | exports.AfterAll = AfterAll;
|
33 | exports.afterAll = AfterAll;
|
34 | exports.default = decorator;
|
35 | //# sourceMappingURL=afterAll.js.map |
\ | No newline at end of file |