aws-sdk-js-v3
aws-sdk-js-v3 copied to clipboard
Unterminated template literal
Describe the bug
ERROR in node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts with version 3.5.3 of Typescript.
Expected Behavior
Compilation succeeds.
Current Behavior
ERROR in node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts:21:19 - error TS1005: ']' expected.
21 [K in keyof T as ${Uncapitalize<string & K>}
]: T[K];
node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts:21:49 - error TS1005: '(' expected.
21 [K in keyof T as ${Uncapitalize<string & K>}
]: T[K];
node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts:31:1 - error TS1160: Unterminated template literal.
Reproduction Steps
more
Possible Solution
No response
Additional Information/Context
No response
SDK version used
@aws-sdk/[email protected]
Environment details (OS name and version, etc.)
macOS
Hi @llh-check, thanks for opening this issue.
Could you please provide more details about how exactly you are getting this error?
Thanks!
Hi @yenfryherrerafeliz
Same as https://github.com/aws/aws-sdk-js-v3/issues/2474
running typescript < 4.0.0 cannot correctly get types.
PR:https://github.com/aws/aws-sdk-js-v3/pull/3121
Hi @llh-check, is this still an issue for you?, if so, would it be possible for you to upgrade to a most recent TS version?. Basically this issue happens because the SDK started to use template literal types and mapped types, and the support for this typing mechanism was introduced in TS 4.1.
I look forward to your response.
Thanks!
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.