From e8d56ffc0dc5a8077d287d7f1e968cbd17c927b8 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 19 Aug 2020 13:12:22 -0400 Subject: [PATCH 1/2] fix: ts.NamedTupleMember workaround for TS 3.9 & 4 Co-authored-by: Brad Zacher Co-authored-by: ExE Boss Co-authored-by: Christopher J. Brody --- packages/typescript-estree/src/ts-estree/ts-nodes.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/typescript-estree/src/ts-estree/ts-nodes.ts b/packages/typescript-estree/src/ts-estree/ts-nodes.ts index 010f6b2619d..738002e1ea1 100644 --- a/packages/typescript-estree/src/ts-estree/ts-nodes.ts +++ b/packages/typescript-estree/src/ts-estree/ts-nodes.ts @@ -1,5 +1,12 @@ import * as ts from 'typescript'; +// Workaround for +// https://github.com/typescript-eslint/typescript-eslint/issues/2388 +// to support both TypeScript 3.9 & 4: +declare module 'typescript' { + export interface NamedTupleMember extends ts.Node {} +} + export type TSToken = ts.Token; export type TSNode = From 9df80bd239328865d5db830dc99a91b894180bd4 Mon Sep 17 00:00:00 2001 From: "Christopher J. Brody" Date: Wed, 19 Aug 2020 13:36:15 -0400 Subject: [PATCH 2/2] fix: add eslint ignore comment --- packages/typescript-estree/src/ts-estree/ts-nodes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/typescript-estree/src/ts-estree/ts-nodes.ts b/packages/typescript-estree/src/ts-estree/ts-nodes.ts index 738002e1ea1..354d4ce21d5 100644 --- a/packages/typescript-estree/src/ts-estree/ts-nodes.ts +++ b/packages/typescript-estree/src/ts-estree/ts-nodes.ts @@ -4,6 +4,7 @@ import * as ts from 'typescript'; // https://github.com/typescript-eslint/typescript-eslint/issues/2388 // to support both TypeScript 3.9 & 4: declare module 'typescript' { + // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface NamedTupleMember extends ts.Node {} }