UNPKG

1.28 kBSource Map (JSON)View Raw
1{"version":3,"file":"after.js","sourceRoot":"","sources":["src/after.ts"],"names":[],"mappings":";;AAAA,oCAAuC;AAEvC,qCAA+E;AAC/E,6CAAoD;AAEpD,IAAM,SAAS,GAAG,0BAAgB,CAAC,uBAAuB,CACxD,IAAI,yBAAe,CAAC,KAAK,EAAE,IAAI,iCAAmB,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CACxE,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAsB,CAAS;IAC7B,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAFD,sBAEC;AACiB,sBAAK;AACvB,kBAAe,SAAS,CAAC","sourcesContent":["import after = require('lodash/after');\n\nimport { DecoratorConfig, DecoratorFactory, LodashDecorator } from './factory';\nimport { PostValueApplicator } from './applicators';\n\nconst decorator = DecoratorFactory.createInstanceDecorator(\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 * @param {number} n The number of calls before the function is invoked.\n * @example\n *\n * class MyClass {\n * @After(2)\n * fn() {\n * return 10;\n * }\n * }\n *\n * const myClass = new MyClass();\n *\n * myClass.fn(); // => undefined\n * myClass.fn(); // => 10\n */\nexport function After(n: number): LodashDecorator {\n return decorator(n);\n}\nexport { After as after };\nexport default decorator;\n"]}
\No newline at end of file