UNPKG

1.47 kBSource Map (JSON)View Raw
1{"version":3,"file":"afterAll.js","sourceRoot":"","sources":["src/afterAll.ts"],"names":[],"mappings":";;AAAA,oCAAuC;AAEvC,qCAA+E;AAC/E,6CAAoD;AAEpD,IAAM,SAAS,GAAG,0BAAgB,CAAC,eAAe,CAChD,IAAI,yBAAe,CAAC,KAAK,EAAE,IAAI,iCAAmB,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CACxE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,kBAAyB,CAAS;IAChC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAFD,4BAEC;AACoB,4BAAQ;AAC7B,kBAAe,SAAS,CAAC","sourcesContent":["import after = require('lodash/after');\n\nimport { DecoratorConfig, DecoratorFactory, LodashDecorator } from './factory';\nimport { PostValueApplicator } from './applicators';\n\nconst decorator = DecoratorFactory.createDecorator(\n new DecoratorConfig(after, new PostValueApplicator(), { setter: true })\n);\n\n/**\n * The opposite of Before. This method creates a function that invokes once it's called n or more times.\n * This spans across all instances of the class instead of the instance.\n * @param {number} n The number of calls before the function is invoked.\n * @example\n *\n * class MyClass {\n * @AfterAll(2)\n * fn() {\n * return 10;\n * }\n * }\n *\n * const myClass = new MyClass();\n * const myClass2 = new MyClass();\n *\n * myClass.fn(); // => undefined\n * myClass.fn(); // => 10\n *\n * myClass2.fn(); // => 10\n * myClass2.fn(); // => 10\n */\nexport function AfterAll(n: number): LodashDecorator {\n return decorator(n);\n}\nexport { AfterAll as afterAll };\nexport default decorator;\n"]}
\No newline at end of file