11# babel-plugin-transform-typescript-metadata
22
3- ![ GitHub Workflow Build Status] ( https://img.shields.io/github/workflow/status/leonardfactory/babel-plugin-transform-typescript-metadata/CI/master )
3+ ![ GitHub Workflow Build Status] ( https://img.shields.io/github/actions/ workflow/status/leonardfactory/babel-plugin-transform-typescript-metadata/test.yml )
44[ ![ Codecov] ( https://img.shields.io/codecov/c/github/leonardfactory/babel-plugin-transform-typescript-metadata.svg )] ( https://codecov.io/gh/leonardfactory/babel-plugin-transform-typescript-metadata )
55[ ![ npm] ( https://img.shields.io/npm/v/babel-plugin-transform-typescript-metadata.svg?style=popout )] ( https://www.npmjs.com/package/babel-plugin-transform-typescript-metadata )
66
@@ -124,14 +124,11 @@ let { lazyInject: originalLazyInject } = getDecorators(container);
124124
125125// Additional function to make properties decorators compatible with babel.
126126function fixPropertyDecorator<T extends Function >(decorator : T ): T {
127- return ((... args : any []) => (
128- target : any ,
129- propertyName : any ,
130- ... decoratorArgs : any []
131- ) => {
132- decorator (... args )(target , propertyName , ... decoratorArgs );
133- return Object .getOwnPropertyDescriptor (target , propertyName );
134- }) as any ;
127+ return ((... args : any []) =>
128+ (target : any , propertyName : any , ... decoratorArgs : any []) => {
129+ decorator (... args )(target , propertyName , ... decoratorArgs );
130+ return Object .getOwnPropertyDescriptor (target , propertyName );
131+ }) as any ;
135132}
136133
137134export const lazyInject = fixPropertyDecorator (originalLazyInject );
@@ -140,8 +137,8 @@ export const lazyInject = fixPropertyDecorator(originalLazyInject);
140137## Current Pitfalls
141138
142139- If you are using webpack and it complains about missing exports due to types
143- not being removed, you can switch from ` import { MyType } from ... ` to
144- ` import type { MyType } from ... ` . See [ #46 ] ( https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/issues/46 ) for details and
140+ not being removed, you can switch from ` import { MyType } from ... ` to
141+ ` import type { MyType } from ... ` . See [ #46 ] ( https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/issues/46 ) for details and
145142 examples.
146143
147144- We cannot know if type annotations are just types (i.e. ` IMyInterface ` ) or
0 commit comments