The plugin doesn't detect decorators which are defined as an object accessed using a member access operator.-sign. Looking at the implementation the regex used to detect decorators doesn't consider a . as valid in the decorator definition.
Steps to reproduce.
- Define a simple decorator as an objec:
export const decorators = {
test: function(constructor: Function) { }
}
import { decorators } from './decorators'
@decorators.test
export MyClass {
}
- Run esbuild with this plugin
Expected outcome
Design time type metadata is emitted
Actual outcome
No design time type metadata is emitted
The plugin doesn't detect decorators which are defined as an object accessed using a member access operator
.-sign. Looking at the implementation the regex used to detect decorators doesn't consider a.as valid in the decorator definition.Steps to reproduce.
Expected outcome
Design time type metadata is emitted
Actual outcome
No design time type metadata is emitted