diff --git a/src/ext/modelist.js b/src/ext/modelist.js index d9b931c168..07092bb140 100644 --- a/src/ext/modelist.js +++ b/src/ext/modelist.js @@ -48,6 +48,7 @@ class Mode { /** * @param {string} filename + * @returns {RegExpMatchArray | null} */ supportsFile(filename) { return filename.match(this.extRe); diff --git a/types/ace-ext.d.ts b/types/ace-ext.d.ts index 8393fb89b1..579d38c5e4 100644 --- a/types/ace-ext.d.ts +++ b/types/ace-ext.d.ts @@ -400,7 +400,7 @@ declare module "ace-code/src/ext/modelist" { mode: string; extensions: string; extRe: RegExp; - supportsFile(filename: string): RegExpMatchArray; + supportsFile(filename: string): RegExpMatchArray | null; } } declare module "ace-code/src/ext/themelist" {