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
{{ message }}
This repository was archived by the owner on May 22, 2025. It is now read-only.
import {AClass} from './aclass';
class MyService {
constructor(aclass: AClass) {}
}
Tsickle options: transformDecorators: true
Output:
main.js
// no import for AClass here!
...
MyService.ctorParameters = function () { return [
// although AClass is now in a value position
{ type: AClass, },
]; };
Root cause
TypeScript right now has now way of allowing a transformer to tell it to not elide a symbol that is only used in a type position (see microsoft/TypeScript#17516).
Workaround
Set emitDecoratorMetadata: true. This way, TypeScript won't elide the import as its own transformer would have moved it into a value position.