Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c committed Sep 9, 2022
1 parent 9fb5819 commit 743da0d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
13 changes: 13 additions & 0 deletions 50538.d.ts
@@ -0,0 +1,13 @@
// https://github.com/microsoft/TypeScript/pull/50538

declare module "main" {
export const main: ({ conflict }: {
conflict: number;
}, { conflict }: {
conflict: number;
}, { dupe, dupe }: {
dupe: number;
}, { function: e }: {
function: number;
}) => number;
}
40 changes: 26 additions & 14 deletions README.md
Expand Up @@ -6,29 +6,41 @@ npm install

```shell
npm run build

# > build
# > npm run --quiet build --workspaces
#
#
# > build
# > tsc --declaration --emitDeclarationOnly --outfile ../4.7.4.d.ts ../main.ts
#
# > build
# > tsc --declaration --emitDeclarationOnly --outfile ../4.8.3.d.ts ../main.ts
```

```shell
npm run lint
npm run --silent lint 4.7.4.d.ts

# > lint
# > tsc --noEmit *.d.ts
#
npm run --silent lint 4.8.3.d.ts
# 4.8.3.d.ts:8:19 - error TS1005: ':' expected.
#
# 8 }, { function }: {
# ~
#
#
# Found 1 error in 4.8.3.d.ts:8

npm run --silent lint 50538.d.ts
# 50538.d.ts:4:27 - error TS2300: Duplicate identifier 'conflict'.
#
# 4 export const main: ({ conflict }: {
# ~~~~~~~~
#
# 50538.d.ts:6:10 - error TS2300: Duplicate identifier 'conflict'.
#
# 6 }, { conflict }: {
# ~~~~~~~~
#
# 50538.d.ts:8:10 - error TS2300: Duplicate identifier 'dupe'.
#
# 8 }, { dupe, dupe }: {
# ~~~~
#
# 50538.d.ts:8:16 - error TS2300: Duplicate identifier 'dupe'.
#
# 8 }, { dupe, dupe }: {
# ~~~~
#
#
# Found 4 errors in the same file, starting at: 50538.d.ts:4
```
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"scripts": {
"build": "npm run build --workspaces",
"lint": "tsc --noEmit *.d.ts"
"lint": "tsc --noEmit"
},
"workspaces": [
"4.7.4",
Expand Down

0 comments on commit 743da0d

Please sign in to comment.