aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

Unterminated template literal

Open llh-check opened this issue 2 years ago • 2 comments

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

llh-check avatar Jun 28 '22 06:06 llh-check

Hi @llh-check, thanks for opening this issue.

Could you please provide more details about how exactly you are getting this error?

Thanks!

yenfryherrerafeliz avatar Jun 30 '22 18:06 yenfryherrerafeliz

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

llh-check avatar Jul 01 '22 02:07 llh-check

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!

yenfryherrerafeliz avatar Nov 07 '23 03:11 yenfryherrerafeliz

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.

github-actions[bot] avatar Nov 15 '23 00:11 github-actions[bot]

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.

github-actions[bot] avatar Dec 04 '23 00:12 github-actions[bot]