I have debug-time Typescript decorator @log, which logs input/output/stats of the decorated functions.
I'd like to totally strip this particular @log decorator when compiling release version.
It is easy to remove console.log statements from the release build or do things conditionally in the decorator code, but I would like to make sure there's no overhead with calling decorator function itself.
Is there any way this can be achieved with Typescript?
My project is webpack-based. If this is not possible with Typescript, maybe this can be done at later stage with Babel plugin, with UglifyJS or some other alternative plugin?