diff --git a/apps/oxlint/src-js/globals.d.ts b/apps/oxlint/src-js/globals.d.ts index e4d19096f9bd6..5db7c9fd96e20 100644 --- a/apps/oxlint/src-js/globals.d.ts +++ b/apps/oxlint/src-js/globals.d.ts @@ -5,3 +5,9 @@ declare const DEBUG: boolean; // `true` if is build for conformance testing declare const CONFORMANCE: boolean; + +// `RegExp.escape` is not yet in TypeScript's lib types (available from ES2025). +// TODO: Remove this once TypeScript ships it. +interface RegExpConstructor { + escape(this: void, str: string): string; +}