tsickle: Don't wrap import() expression
Source:
export function moduleLoadCallback() {
return import(/* webpackChunkName: "a" */ "./a.module")
.then(function (module) { return module.A; });
}
TS Out:
export function moduleLoadCallback() {
return import(/* webpackChunkName: "a" */ "./a.module")
.then(function (module) { return module.A; });
}
TsickleOut:
export function moduleLoadCallback() {
return (import)(/* webpackChunkName: "a" */ "./a.module")
.then(function (module) { return module.A; });
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
angular 5 no longer produces generated .ts code, it is all compiled in one pass. this is because we now use a better architecture with TypeScript transformers. There is no option to go back to .ts codegen.
It sounds like using
annotationsAs: "decorators"
might be a workaround for you?I agree that tsickle processing shouldn’t wrap the import keyword in parens.