Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

App build breaking with error TS1005 when using TypeScript 3.9.7 #1977

Closed
trivikr opened this issue Jan 29, 2021 · 1 comment · Fixed by smithy-lang/smithy-typescript#269 or #1978
Closed
Labels
bug This issue is a bug.

Comments

@trivikr
Copy link
Member

trivikr commented Jan 29, 2021

Describe the bug

Refs: #1919

The issue #1919 was fixed not fixed for 3.9.7

Your environment

SDK version number

@aws-sdk/client-s3@3.4.0
typescript@3.9.7

Is the issue in the browser/Node.js/ReactNative?

TypeScript build stage for applicaton

Details of the browser/Node.js/ReactNative version

N/A

Steps to reproduce

package.json
{
  "name": "ts-3.9-test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "build": "tsc"
  },
  "devDependencies": {
    "@types/node": "^14.14.22",
    "typescript": "3.9.7"
  },
  "dependencies": {
    "@aws-sdk/client-s3": "3.4.0"
  }
}
index.ts
import { S3 } from "@aws-sdk/client-s3";

(async () => {
  const region = "us-west-2";
  const client = new S3({ region });
  await client.listBuckets({});
})();
tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "strict": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true
  }
}

Observed behavior

The following error is thrown for the code example give below:

yarn run v1.22.10
$ tsc
node_modules/@aws-sdk/types/types/util.d.ts:92:42 - error TS1005: ',' expected.
92 export declare type UserAgentPair = [name: string, version?: string];
                                            ~
node_modules/@aws-sdk/types/types/util.d.ts:92:60 - error TS1005: ',' expected.
92 export declare type UserAgentPair = [name: string, version?: string];
                                                              ~
Found 2 errors.

error Command failed with exit code 2.

Expected behavior

No error is thrown when compiling client code with TypeScript version 3.9.x

@trivikr trivikr added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 29, 2021
@trivikr trivikr changed the title Build breaking with error TS1005 when building with TypeScript 3.9.7 App build breaking with error TS1005 when using TypeScript 3.9.7 Jan 29, 2021
@trivikr trivikr removed the needs-triage This issue or PR still needs to be triaged. label Jan 29, 2021
@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug.
Projects
None yet
1 participant