We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
@babel/parser
infer
Programmatic API (babel.transform, babel.parse)
babel.transform
babel.parse
type X = infer U;
No response
const code = "type X = infer U"; require("@babel/parser").parse(code, { plugins: ["typescript"] });
Current:
No error.
Expected:
'infer' declarations are only permitted in the 'extends' clause of a conditional type. error is thrown.
'infer' declarations are only permitted in the 'extends' clause of a conditional type.
System: OS: macOS 10.15.7 Binaries: Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node Yarn: 3.1.1 - ~/.nvm/versions/node/v16.13.2/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm Monorepos: Yarn Workspaces: 3.1.1 npmPackages: @babel/cli: ^7.17.0 => 7.17.0 @babel/core: ^7.17.0 => 7.17.8 @babel/eslint-config-internal: workspace:^ => 7.16.1 @babel/eslint-parser: workspace:^ => 7.17.0 @babel/eslint-plugin-development: workspace:^ => 7.17.7 @babel/eslint-plugin-development-internal: workspace:^ => 7.17.7 @babel/plugin-proposal-dynamic-import: ^7.16.7 => 7.16.7 @babel/plugin-proposal-export-namespace-from: ^7.16.7 => 7.16.7 @babel/plugin-proposal-object-rest-spread: ^7.16.7 => 7.16.7 @babel/plugin-transform-modules-commonjs: ^7.16.8 => 7.16.8 @babel/plugin-transform-runtime: ^7.17.0 => 7.17.0 @babel/preset-env: ^7.16.11 => 7.16.11 @babel/preset-flow: ^7.16.7 => 7.16.7 @babel/preset-typescript: ^7.16.7 => 7.16.7 @babel/runtime: ^7.17.0 => 7.17.0 babel-plugin-transform-charcodes: ^0.2.0 => 0.2.0 eslint: ^8.9.0 => 8.9.0 jest: ^27.4.0 => 27.4.0
#14476 (comment)
The text was updated successfully, but these errors were encountered:
+1, same issue here
Sorry, something went wrong.
No branches or pull requests
馃捇
How are you using Babel?
Programmatic API (
babel.transform
,babel.parse
)Input code
Configuration file name
No response
Configuration
Current and expected behavior
Current:
No error.
Expected:
'infer' declarations are only permitted in the 'extends' clause of a conditional type.
error is thrown.Environment
Possible solution
No response
Additional context
#14476 (comment)
The text was updated successfully, but these errors were encountered: