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.
By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
[Bug]: node_modules/@types/babel__traverse/index.d.ts throws errors in TS (version 7.18.3)
#15245
[Bug]: node_modules/@types/babel__traverse/index.d.ts throws errors in TS (version 7.18.3)
gesabehrends
opened this issue
Dec 2, 2022
· 2 comments
Other (Next.js, Gatsby, vue-cli, ...)
Input code
tsc on a new cdk init project including
@types/[email protected]
as transitive dependency
Configuration file name
package.json
Configuration
"devDependencies": {
"@types/jest": "^27.5.0",
"@types/node": "10.17.27",
"@types/prettier": "2.6.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"aws-cdk": "2.24.1",
"ts-node": "^10.7.0",
"typescript": "~3.9.7"
Current and expected behavior
Expected: No errors thrown.
node_modules/@types/babel__traverse/index.d.ts:68:50 - error TS1005: ']' expected.
68 export type ArrayKeys = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
node_modules/@types/babel__traverse/index.d.ts:68:53 - error TS1005: ';' expected.
68 export type ArrayKeys = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
node_modules/@types/babel__traverse/index.d.ts:68:58 - error TS1005: ';' expected.
68 export type ArrayKeys = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
~~~~~~~
node_modules/@types/babel__traverse/index.d.ts:68:70 - error TS1011: An element access expression should take an argument.
68 export type ArrayKeys = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
node_modules/@types/babel__traverse/index.d.ts:68:83 - error TS1005: ';' expected.
68 export type ArrayKeys = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
node_modules/@types/babel__traverse/index.d.ts:68:84 - error TS1128: Declaration or statement expected.
68 export type ArrayKeys = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
node_modules/@types/babel__traverse/index.d.ts:68:88 - error TS1128: Declaration or statement expected.
68 export type ArrayKeys = keyof { [P in keyof T as T[P] extends any[] ? P : never]: P };
Environment
System:
OS: macOS 12.6.1
Binaries:
Node: 16.15.1 - /usr/local/opt/node@16/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.11.0 - /usr/local/opt/node@16/bin/npm
npmPackages:
jest: ^27.5.1 => 27.5.1
Possible solution
No response
Additional context
No response
Hey
@gesabehrends
! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant
Slack community
that typically always has someone willing to help. You can sign-up
here
for an invite.