Skip to content

Commit de21d50

Browse files
akoremanAlice Koreman
and
Alice Koreman
authored
fix: fix return type of supportsFile modelist (#5705)
Co-authored-by: Alice Koreman <[email protected]>
1 parent 9c94712 commit de21d50

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ext/modelist.js

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class Mode {
4848

4949
/**
5050
* @param {string} filename
51+
* @returns {RegExpMatchArray | null}
5152
*/
5253
supportsFile(filename) {
5354
return filename.match(this.extRe);

types/ace-ext.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ declare module "ace-code/src/ext/modelist" {
400400
mode: string;
401401
extensions: string;
402402
extRe: RegExp;
403-
supportsFile(filename: string): RegExpMatchArray;
403+
supportsFile(filename: string): RegExpMatchArray | null;
404404
}
405405
}
406406
declare module "ace-code/src/ext/themelist" {

0 commit comments

Comments
 (0)