-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[preset-typescript] Ternaries that call a function named async fail to parse #17547
Copy link
Copy link
Closed
Copy link
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
Configuration file name
No response
Configuration
{
"filename": "/Users/brendonovich/github.com/brendonovich/macrograph/apps/web/.nitro/vite/services/ssr/entry-server.js",
"sourceFileName": "/Users/brendonovich/github.com/brendonovich/macrograph/apps/web/.nitro/vite/services/ssr/entry-server.js",
"presets": [
[
"[Function: function (context, options = {}) {\n const plugins ... ]",
{
"generate": "ssr",
"hydratable": true
}
]
],
"plugins": [],
"ast": false,
"sourceMaps": true,
"configFile": false,
"babelrc": false,
"parserOpts": {
"plugins": [
"jsx",
"typescript"
]
}
}Current and expected behavior
This should parse properly as it's valid code
Environment
System:
OS: macOS 14.6.1
Binaries:
Node: 24.6.0 - /Users/brendonovich/.local/state/fnm_multishells/58644_1760265053835/bin/node
npm: 11.5.1 - /Users/brendonovich/.local/state/fnm_multishells/58644_1760265053835/bin/npm
pnpm: 10.12.4 - /opt/homebrew/bin/pnpm
bun: 1.2.21 - /Users/brendonovich/.bun/bin/bun
Possible solution
No response
Additional context
No response
Reactions are currently unavailable