Skip to content

Commit

Permalink
Add TypeScript types for modelist extension (#5467)
Browse files Browse the repository at this point in the history
* Add TypeScript types for modelist extension

* Exclude extRe property from Mode type
  • Loading branch information
nwalters512 committed Mar 1, 2024
1 parent 0e8f549 commit c30fa91
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ace-extensions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,16 @@ declare module "ace-code/src/ext/simple_tokenizer" {
}>>
export function tokenize(content: string, highlightRules: import("./ace").Ace.HighlightRules): TokenizeResult;
}

declare module "ace-code/src/ext/modelist" {
export type Mode = {
name: string;
caption: string;
mode: string;
extensions: string;
supportsFile(filename: string): boolean;
}
export function getModeForPath(path: string): Mode;
export const modes: Mode[];
export const modesByName: Record<string, Mode>;
}

0 comments on commit c30fa91

Please sign in to comment.