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
When I run npx -p ts-migrate -c "ts-migrate-full ../frontend"
I got a lot of errors with the Unexpected "}"
code example // @ts-expect-error ts-migrate(2322) FIXME: Type '{ children: Element; title: string; fontSize... Remove this comment to see the full error message
Error: [declare-missing-class-properties][src/app/views/dashboard/shared/TopSellingTable.tsx] Error: SyntaxError: Unexpected token, expected "}" (49:76) at Object._raise (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:541:17) at Object.raiseWithData (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:534:17) at Object.raise (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:495:17) at Object.unexpected (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:3580:16) at Object.expect (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:3554:28) at Object.jsxParseExpressionContainer (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7331:10) at Object.jsxParseElementAt (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7422:36) at Object.jsxParseElementAt (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7407:32) at Object.jsxParseElement (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7465:17) at Object.parseExprAtom (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7472:19) { loc: Position { line: 49, column: 76 }, pos: 1995, code: 'BABEL_PARSER_SYNTAX_ERROR',
I found that the error was caused by the interception of the wrong content. In ts-ignore.js 43 lines of slice in the file.
const tsIgnoreCommentText = @${errorExpression} ts-migrate(${code}) FIXME: ${message.length > TS_IGNORE_MESSAGE_LIMIT
? ${message.slice(0, TS_IGNORE_MESSAGE_LIMIT)}... Remove this comment to see the full error message
: message};
The text was updated successfully, but these errors were encountered:
JackGod001
changed the title
Unexpected token, expected "}"
Unexpected "}"
Dec 5, 2021
When I run npx -p ts-migrate -c "ts-migrate-full ../frontend"
I got a lot of errors with the Unexpected "}"
code example
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ children: Element; title: string; fontSize... Remove this comment to see the full error message
Error: [declare-missing-class-properties][src/app/views/dashboard/shared/TopSellingTable.tsx] Error: SyntaxError: Unexpected token, expected "}" (49:76) at Object._raise (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:541:17) at Object.raiseWithData (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:534:17) at Object.raise (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:495:17) at Object.unexpected (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:3580:16) at Object.expect (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:3554:28) at Object.jsxParseExpressionContainer (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7331:10) at Object.jsxParseElementAt (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7422:36) at Object.jsxParseElementAt (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7407:32) at Object.jsxParseElement (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7465:17) at Object.parseExprAtom (/Users/baishaojie/python/django_react/frontend/node_modules/@babel/parser/lib/index.js:7472:19) { loc: Position { line: 49, column: 76 }, pos: 1995, code: 'BABEL_PARSER_SYNTAX_ERROR',
I found that the error was caused by the interception of the wrong content. In ts-ignore.js 43 lines of slice in the file.
const tsIgnoreCommentText =
@${errorExpression} ts-migrate(${code}) FIXME: ${message.length > TS_IGNORE_MESSAGE_LIMIT?
${message.slice(0, TS_IGNORE_MESSAGE_LIMIT)}... Remove this comment to see the full error message
: message}
;
The text was updated successfully, but these errors were encountered: