-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
59 lines (53 loc) · 1.67 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import * as React from 'react'
import * as MonacoEditor from 'monaco-editor'
import init, { Config } from 'src/monaco/init'
export interface EditorOptions {
readonly?: boolean | undefined,
[propName: string]: any
}
export interface MonacoEditorProps {
width?: number;
height: number;
style?: React.CSSProperties;
value: string;
language: string;
theme?: string;
line?: number;
bordered?: boolean;
options?: MonacoEditor.editor.IEditorOptions;
loading?: React.ReactNode;
modelOptions?: Array<any>;
monacoWillMount?: (monaco: any) => void;
editorDidMount?: (editor: MonacoEditor.editor.IStandaloneCodeEditor | undefined, monaco: any) => void;
onChange?: (value: string | null) => void;
cdnConfig?: Config;
}
declare class MonacoEditor extends React.Component<MonacoEditorProps> {
render(): JSX.Element
}
export interface DiffProps {
width?: number;
height?: number;
style?: React.CSSProperties;
original: string;
modified: string;
originalLanguage?: string;
modifiedLanguage?: string;
language: string;
theme?: string;
options?: MonacoEditor.editor.IDiffEditorOptions;
monacoWillMount?: (monaco: any) => void;
editorDidMount?: (original: MonacoEditor.editor.ITextModel, modified: MonacoEditor.editor.ITextModel, editor: MonacoEditor.editor.IStandaloneDiffEditor) => void;
onChange?: (value: string) => void;
/**
* custom cdn
*/
cdnConfig?: Config;
}
export class DiffEditor extends React.Component<MonacoEditorProps> {
render(): JSX.Element
}
export declare const themeNames: Array<'active4d'|'clouds'|'chrome'|'monokai'|'solarized-dark'|'solarized-light'>;
export declare namespace monaco {
function init (): Promise<any>;
}