Skip to content

Commit 50a46c6

Browse files
authored
fix(typescript-estree): fix type-only regression for consumers not yet on TS 4.1 (#2789)
1 parent f3bf6a1 commit 50a46c6

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@
109109
"typescript": ">=3.3.1 <4.2.0 || 4.1.1-rc"
110110
},
111111
"resolutions": {
112-
"typescript": "4.1.1-rc"
112+
"typescript": "4.1.2"
113113
}
114114
}

Diff for: packages/typescript-estree/src/ts-estree/ts-nodes.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import * as ts from 'typescript';
22

3-
// Workaround for
4-
// https://github.com/typescript-eslint/typescript-eslint/issues/2388
5-
// to support both TypeScript 3.9 & 4:
3+
// Workaround to support new TS version features for consumers on old TS versions
4+
// Eg: https://github.com/typescript-eslint/typescript-eslint/issues/2388, https://github.com/typescript-eslint/typescript-eslint/issues/2784
65
declare module 'typescript' {
7-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
6+
/* eslint-disable @typescript-eslint/no-empty-interface */
87
export interface NamedTupleMember extends ts.Node {}
8+
export interface TemplateLiteralTypeNode extends ts.Node {}
9+
/* eslint-enable @typescript-eslint/no-empty-interface */
910
}
1011

1112
export type TSToken = ts.Token<ts.SyntaxKind>;

Diff for: yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -8684,10 +8684,10 @@ typedarray@^0.0.6:
86848684
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
86858685
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
86868686

8687-
typescript@*, [email protected].1-rc, "typescript@>=3.3.1 <4.2.0 || 4.1.1-rc", typescript@^4.1.0-dev.20201026:
8688-
version "4.1.1-rc"
8689-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.1-rc.tgz#4a335244b9b2754995849ca4b607c74d6ee73719"
8690-
integrity sha512-tgNcFrLIjlaMWEc7bKC0bxLNIt8BIAauY/HLUOQDyTP75HGskETtXOt46x4EKAHRKhWVLMc7yM02puTHa/yhCA==
8687+
typescript@*, [email protected].2, "typescript@>=3.3.1 <4.2.0 || 4.1.1-rc", typescript@^4.1.0-dev.20201026:
8688+
version "4.1.2"
8689+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
8690+
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
86918691

86928692
uc.micro@^1.0.1, uc.micro@^1.0.5:
86938693
version "1.0.6"

0 commit comments

Comments
 (0)