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
Upon running babel with this input and configuration, a warning is emitted:
% ./node_modules/@babel/cli/bin/babel.js ./test.ts
The exported identifier "undefined" is not declared in Babel's scope tracker
as a JavaScript value binding, and "@babel/plugin-transform-typescript"
never encountered it as a TypeScript type declaration.
It will be treated as a JavaScript value.
This problem is likely caused by another plugin injecting
"undefined" without registering it in the scope tracker. If you are the author
of that plugin, please use "scope.registerDeclaration(declarationPath)".
Given that this is a perfectly valid snippet and not due to a misconfigured upstream plugin, this warning seems inappropriate and no output should be produced.
I suspect the issue is that the Typescript transform only checks the scope for it's own bindings, rather than hasBinding, but obviously I'm not particularly familiar with this code.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hey @marcusdarmstrong! 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.
馃捇
How are you using Babel?
@babel/cli
Input code
Configuration file name
babel.config.json
Configuration
Current and expected behavior
Upon running babel with this input and configuration, a warning is emitted:
Given that this is a perfectly valid snippet and not due to a misconfigured upstream plugin, this warning seems inappropriate and no output should be produced.
Environment
System:
OS: macOS 11.6
Binaries:
Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
npmPackages:
@babel/cli: 7.18.10 => 7.18.10
@babel/preset-typescript: 7.18.6 => 7.18.6
Possible solution
I suspect the issue is that the Typescript transform only checks the scope for it's own bindings, rather than
hasBinding
, but obviously I'm not particularly familiar with this code.Additional context
No response
The text was updated successfully, but these errors were encountered: