Skip to content

Commit 838872f

Browse files
committed
fix(linter/plugins): define RegExp.escape for tsc
1 parent f3aa4cd commit 838872f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

apps/oxlint/src-js/globals.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ declare const DEBUG: boolean;
55

66
// `true` if is build for conformance testing
77
declare const CONFORMANCE: boolean;
8+
9+
// `RegExp.escape` is not yet in TypeScript's lib types (available from ES2025).
10+
// TODO: Remove this once TypeScript ships it.
11+
interface RegExpConstructor {
12+
escape(str: string): string;
13+
}

0 commit comments

Comments
 (0)