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
TypeScript has introduced auto accessors in version 4.9, currently esbuild (version 0.17.12) does not support this syntax and builds on typescript files that use this feature are outright failing with the following error:
✘ [ERROR] Expected ";" but found "text"
src/index.ts:82:11:
82 │ accessor text = "";
│ ~~~~
╵ ;
Error: Build failed with 1 error:
src/index.ts:82:11: ERROR: Expected ";" but found "text"
at failureErrorWithLog (~/app/node_modules/esbuild/lib/main.js:1636:15)
at ~/app/node_modules/esbuild/lib/main.js:1048:25
at ~/app/node_modules/esbuild/lib/main.js:993:52
at buildResponseToResult (~/app/node_modules/esbuild/lib/main.js:1046:7)
at ~/app/node_modules/esbuild/lib/main.js:1075:16
at responseCallbacks.<computed> (~/app/node_modules/esbuild/lib/main.js:697:9)
at handleIncomingPacket (~/app/node_modules/esbuild/lib/main.js:752:9)
at Socket.readFromStdout (~/app/node_modules/esbuild/lib/main.js:673:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [],
pluginName: '',
text: 'Expected ";" but found "text"'
}
],
warnings: []
}
At the very least ESBuild should be able to parse files that use accessors and leave them as is, in case the target is ESNext. Though it'd be best if ESBuild could generate similar output to TypeScript and transform accessor to get and set functions for any target older than ES2023.
The text was updated successfully, but these errors were encountered:
TypeScript has introduced auto accessors in version 4.9, currently esbuild (version 0.17.12) does not support this syntax and builds on typescript files that use this feature are outright failing with the following error:
At the very least ESBuild should be able to parse files that use accessors and leave them as is, in case the target is
ESNext
. Though it'd be best if ESBuild could generate similar output to TypeScript and transformaccessor
toget
andset
functions for any target older thanES2023
.The text was updated successfully, but these errors were encountered: