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
This code seems to fail even with the latest version of esbuild and I'm not sure if I configured something wrong or if this syntax isn't supported by esbuild yet:
This new TS 4.7 syntax simplifies the definitions slightly but esbuild seems to not like it. I could rewrite it to use the old syntax but it just adds a lot of nesting.
Error Stack
Error: Transform failed with 1 error:
/.../file.ts:45:26: ERROR: Expected "?" but found ","
at failureErrorWithLog (/.../node_modules/esbuild/lib/main.js:1612:15)
at /.../node_modules/esbuild/lib/main.js:1401:29
at /.../node_modules/esbuild/lib/main.js:675:9
at handleIncomingPacket (/.../node_modules/esbuild/lib/main.js:772:9)
at Socket.readFromStdout (/.../node_modules/esbuild/lib/main.js:641:7)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
errors: [
{
detail: undefined,
id: '',
location: {
column: 26,
file: '/.../file.ts',
length: 1,
line: 45,
lineText: '\tinfer Item extends string,',
namespace: '',
suggestion: '?'
},
notes: [],
pluginName: '',
text: 'Expected "?" but found ","'
}
],
warnings: [],
frame: '\n' +
'\x1B[33mExpected "?" but found ","\x1B[39m\n' +
'43 | \n' +
'44 | type JoinDot = Items extends [\n' +
'45 | \tinfer Item extends string,\n' +
' | ^\n' +
'46 | \t...infer Rest extends string[],\n' +
'47 | ]\n',
loc: {
column: 26,
file: '/.../file.ts',
length: 1,
line: 45,
lineText: '\tinfer Item extends string,',
namespace: '',
suggestion: '?'
},
plugin: 'vite:esbuild',
id: '/.../file.ts',
pluginCode: '...'
}
I'm using vite but forced esbuild to the latest version 0.14.45. If this isn't an esbuild issue but rather a vite issue, apologies in advance!
The text was updated successfully, but these errors were encountered:
This code seems to fail even with the latest version of esbuild and I'm not sure if I configured something wrong or if this syntax isn't supported by esbuild yet:
This new TS 4.7 syntax simplifies the definitions slightly but esbuild seems to not like it. I could rewrite it to use the old syntax but it just adds a lot of nesting.
Error Stack
The text was updated successfully, but these errors were encountered: