Skip to content

Commit c1f0d05

Browse files
authored
Update acode.d.ts
1 parent f4860da commit c1f0d05

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

typings/acode.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
declare module 'acode' {
2+
type Module = Object | Function;
3+
4+
interface Acode {
5+
define(name: string, module: Module): void;
6+
require(module: string): Module | undefined;
7+
exec(key: string, val?: any): boolean | undefined;
8+
readonly exitAppMessage: string | undefined;
9+
setLoadingMessage(message: string): void;
10+
setPluginInit(id: string, initFunction: Function, settings: any): void;
11+
getPluginSettings(id: string): any;
12+
setPluginUnmount(id: string, unmountFunction: Function): void;
13+
initPlugin(id: string, baseUrl: Url, $page: HTMLElement, options: any): Promise<void>;
14+
unmountPlugin(id: string): void;
15+
registerFormatter(id: string, extensions: string[], format: () => Promise<void>): void;
16+
unregisterFormatter(id: string): void;
17+
format(selectIfNull?: boolean): Promise<void>;
18+
fsOperation(file: string): FileSystem;
19+
newEditorFile(filename: string, options?: any): EditorFile;
20+
}
21+
22+
const acode: Acode;
23+
export default acode;
24+
}

0 commit comments

Comments
 (0)