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
I don't think environment information is needed because this issue is simple, but I will provide it if it is needed for you guys.
Possible Solution
Additional context
While working in Prettier, I notice that declare disappears. (Prettier Playground link)
It is possible to fix this issue on Prettier side, but I think this is the parser's responsibility.
The text was updated successfully, but these errors were encountered:
Hey @sosukesuzuki! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."
Bug Report
Current behavior
Convert a TypeScript declare function with a body into a function.
Try it out link
Output:
Input Code
Expected behavior
It should throw an error like tsc(TypeScript Playground). And it should support
errorRecovery
.Also babel/parser should return a node of
TSDeclareFunction
instead ofFunctionDeclaration(declare: true)
.Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.js
Environment
I don't think environment information is needed because this issue is simple, but I will provide it if it is needed for you guys.
Possible Solution
Additional context
While working in Prettier, I notice that
declare
disappears. (Prettier Playground link)It is possible to fix this issue on Prettier side, but I think this is the parser's responsibility.
The text was updated successfully, but these errors were encountered: