Skip to content

Commit 1302b30

Browse files
authored
fix(typescript-estree): stub out ts.SatisfiesExpression on old TS versions (#6076)
<!-- 👋 Hi, thanks for sending a PR to typescript-eslint! 💖 Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken ## Overview <!-- Description of what is changed and how the code change does that. --> Another thing we need to add to the "new syntax" contributor guide. This union is part of the API surface for the package, so we need to ensure we don't break the build on old TS versions by "stubbing" out the new AST node types. Also added version comments so it's easy to tell when we can remove them as we bump the minimum TS version Co-authored-by: bjz@Brads-MacBook-Pro.local <>
1 parent 53671d3 commit 1302b30

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/typescript-estree/src/ts-estree/ts-nodes.ts

+6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ import type * as ts from 'typescript';
44
// Eg: https://github.com/typescript-eslint/typescript-eslint/issues/2388, https://github.com/typescript-eslint/typescript-eslint/issues/2784
55
declare module 'typescript' {
66
/* eslint-disable @typescript-eslint/no-empty-interface */
7+
// added in TS 4.0
78
export interface NamedTupleMember extends ts.Node {}
9+
// added in TS 4.1
810
export interface TemplateLiteralTypeNode extends ts.Node {}
11+
// added in TS 4.3
912
export interface PrivateIdentifier extends ts.Node {}
1013
export interface ClassStaticBlockDeclaration extends ts.Node {}
14+
// added in TS 4.5
1115
export interface AssertClause extends ts.Node {}
1216
export interface AssertEntry extends ts.Node {}
17+
// added in TS 4.9
18+
export interface SatisfiesExpression extends ts.Node {}
1319
/* eslint-enable @typescript-eslint/no-empty-interface */
1420
}
1521

0 commit comments

Comments
 (0)