You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When combining emitDecoratorMetadata with type-only imports, the generated code crashes at runtime. I've been unable to produce a repro on the playground, since it somehow adds another undefined check, so I'll show you real-world code where this happens:
TypeScript Version: 3.9.0-dev.20200329
Search Terms: emitDecoratorMetadata type import
When combining
emitDecoratorMetadata
with type-only imports, the generated code crashes at runtime. I've been unable to produce a repro on the playground, since it somehow adds another undefined check, so I'll show you real-world code where this happens:https://github.com./AlCalzone/node-zwave-js/tree/41da020d7515826e3e8fc2e0c3fc24a0d3c19355
npm i
npm i -D [email protected]
npm run build
build/lib/commandclass/MultiChannelCC.js
Code
This is the core of the problem
Expected behavior:
like on the playground link above
Actual behavior:
Notice how the value side of
Driver
is referenced at runtime, although the import is type-only.Playground Link: Playground does not allow relative imports
Related Issues: #27519
The text was updated successfully, but these errors were encountered: