We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Version: 2.4.2
Context Needed by Angular / Tsickle for converting TypeScript types into closure type comments.
Our workaround (see transformer_util.ts):
ts.Node.Symbol
@internal
Code
Plunker is here.
case.ts
module Reflect { const x = 1; }
transformer.ts:
function forceSyntheticModuleDeclaration(context: ts.TransformationContext) { return (sourceFile: ts.SourceFile): ts.SourceFile => { return visitNode(sourceFile); function visitNode<T extends ts.Node>(node: T) { if (node.kind === ts.SyntaxKind.ModuleBlock) { const md = node as ts.ModuleBlock; return ts.updateModuleBlock(md, ts.setTextRange(ts.createNodeArray([...md.statements])); } return ts.visitEachChild(node, visitNode, context); } }; }
Expected behavior: A top level variable statement should be emitted:
var Reflect; (function (Reflect) { var x = 1; })(Reflect || (Reflect = {}));
Actual behavior: No top level variable statement is emitted:
(function (Reflect) { var x = 1; })(Reflect || (Reflect = {}));
/cc @mprobst @evmar @alexeagle
The text was updated successfully, but these errors were encountered:
Fix is up at #17631.
Sorry, something went wrong.
DanielRosenwasser
No branches or pull requests
TypeScript Version: 2.4.2
Context
Needed by Angular / Tsickle for converting TypeScript types into closure type comments.
Our workaround (see transformer_util.ts):
ts.Node.Symbol
from the original node over to the synthetic node (note that this is an@internal
field)Code
Plunker is here.
case.ts
transformer.ts:
Expected behavior:
A top level variable statement should be emitted:
Actual behavior:
No top level variable statement is emitted:
/cc @mprobst @evmar @alexeagle
The text was updated successfully, but these errors were encountered: