-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.d.ts
41 lines (37 loc) · 1.39 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
interface ILanguageDesc {
id: string;
extensions: string[];
aliases: string[];
configuration: string;
filenames?: string[];
firstLine?: string;
/**
* 拓展字段,用来标识当前 language 是来源于哪个插件语言包
*/
extensionPackageName?: string;
}
declare module '@opensumi/textmate-languages' {
export type loadLanguageAndGrammar = (
registerLanguage: (languageContribution: any, extPath: any) => Promise<void>,
registerGrammar: (grammarContribution: any, extPath: any) => Promise<void>,
) => Promise<void>[];
export type LanguageDesc = ILanguageDesc
}
declare module '@opensumi/textmate-languages/es/utils' {
export function getLanguageByExtnameAndFilename(extname: string, filename?: string): ILanguageDesc | undefined;
export function getLanguageById(languageId: string): ILanguageDesc | undefined;
/**
* @deprecated please use `getLanguageById` instead
* @param languageId
*/
export function hasLanguageId(languageId: string): boolean;
}
declare module '@opensumi/textmate-languages/lib/utils' {
export function getLanguageByExtnameAndFilename(extname: string, filename?: string): ILanguageDesc | undefined;
export function getLanguageById(languageId: string): ILanguageDesc | undefined;
/**
* @deprecated please use `getLanguageById` instead
* @param languageId
*/
export function hasLanguageId(languageId: string): boolean;
}