This repository has been archived by the owner on Jan 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
cannot distinguish declare global
on AST.
#27
Comments
// The node that expresses `declare global {}`.
interface TSGlobalAugmentationDeclaration extends Statement {
type: "TSGlobalAugmentationDeclaration"
body: TSModuleBlock
} |
@JamesHenry what do you think about this? I think critical if we cannot distinguish semantic on AST. |
According to babel/typescript its: https://github.com/babel/babel/blob/master/packages/babel-types/src/definitions/typescript.js#L390 defineType("TSModuleDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "body"],
fields: {
declare: validateOptional(bool),
global: validateOptional(bool),
id: validateType(["Identifier", "StringLiteral"]),
body: validateType(["TSModuleBlock", "TSModuleDeclaration"]),
},
}); AST is not aligned it should contain |
🎉 This issue has been resolved in version 5.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of TypeScript are you using?
What version of
typescript-estree
are you using?What code were you trying to parse?
What did you expect to happen?
typescript-estree
generates different nodes because the two have different semantics.What actually happened?
typescript-estree
generates the same node:The text was updated successfully, but these errors were encountered: