mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Update definitions.
This commit is contained in:
+59
-6
@@ -23,6 +23,17 @@ class JSONEditorHistory {
|
||||
redo(): void;
|
||||
}
|
||||
|
||||
interface JSONEditorNodeUpdateDomOptions {
|
||||
recurse?: bool;
|
||||
updateIndexes?: bool;
|
||||
}
|
||||
|
||||
interface JSONEditorNodeType {
|
||||
value: string;
|
||||
className: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
class JSONEditorNode {
|
||||
constructor(editor: JSONEditor, params: Object);
|
||||
setParent(parent: JSONEditorNode): void;
|
||||
@@ -53,10 +64,44 @@ class JSONEditorNode {
|
||||
getDom(): HTMLElement;
|
||||
setHighlight(highlight: bool): void;
|
||||
updateValue(value: any): void;
|
||||
updateField(field: string): void;
|
||||
updateDom(options): void;
|
||||
onEvent(event: Event): void;
|
||||
types: JSONEditorNodeType[];
|
||||
getAppend(): HTMLElement;
|
||||
}
|
||||
|
||||
class JSONEditorAppendNode extends JSONEditorNode {
|
||||
constructor(editor: JSONEditor);
|
||||
}
|
||||
|
||||
interface JSONEditorShowDropDownListParams {
|
||||
x: number;
|
||||
y: number;
|
||||
node: JSONEditorNode;
|
||||
value: string;
|
||||
values: Object[];
|
||||
optionSelectedClassName: string;
|
||||
optionClassName: string;
|
||||
callback: (value: any) => void;
|
||||
}
|
||||
|
||||
class JSONEditorSearchBox {
|
||||
constructor(editor: JSONEditor, container: HTMLElement);
|
||||
next(): void;
|
||||
previous: void;
|
||||
setActiveResult(index: number): void;
|
||||
focusActiveResult(): void;
|
||||
clearDelay(): void;
|
||||
onDelayedSearch(event: Event): void;
|
||||
onSearch(event: Event, forcedSearch: bool): void;
|
||||
onKeyDown(event: Event): void;
|
||||
onKeyUp(event: Event): void;
|
||||
|
||||
}
|
||||
|
||||
class JSONEditor {
|
||||
constructor(container: HTMLElement, options?: JSONEditorOptions, json?: Object);
|
||||
constructor(container: HTMLElement, options?: JSONEditorOptions, json?: any);
|
||||
set(json: Object, name?: string): void;
|
||||
setName(name?: string): void;
|
||||
get(): Object;
|
||||
@@ -69,6 +114,14 @@ class JSONEditor {
|
||||
focus(): void;
|
||||
scrollTo(top: number): void;
|
||||
History: JSONEditorHistory;
|
||||
Node: JSONEditorNode;
|
||||
SearchBox: JSONEditorSearchBox;
|
||||
showDropDownList(): void;
|
||||
getNodeFromTarget(target: HTMLElement): JSONEditorNode;
|
||||
Events: {
|
||||
addEventListener(element: HTMLElement, action: string, )
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
interface JSONFormatterOptions {
|
||||
@@ -77,10 +130,10 @@ interface JSONFormatterOptions {
|
||||
}
|
||||
|
||||
class JSONFormatter {
|
||||
constructor(container: HTMLElement, options?: JSONFormatterOptions, json?: Object);
|
||||
constructor(container: HTMLElement, options?: JSONFormatterOptions, json?: string);
|
||||
set(json: JSON);
|
||||
get(): JSON;
|
||||
setText(jsonString: string);
|
||||
constructor(container: HTMLElement, options?: JSONFormatterOptions, json?: any);
|
||||
set(json: Object);
|
||||
get(): Object;
|
||||
setText(jsonString: string): void;
|
||||
getText(): string;
|
||||
onError(err: string): void;
|
||||
}
|
||||
Reference in New Issue
Block a user