@hey-web-components/monaco-editor
Version:
A web component wrapper for monaco-editor.
52 lines (51 loc) • 1.55 kB
TypeScript
import { editor } from 'monaco-editor';
import { EditorBase } from './editor-base';
type EditorOptions = editor.IDiffEditorOptions & editor.IGlobalEditorOptions;
/**
* @fires {CustomEvent} didUpdateDiff - Fires when the diff is updated.
*/
export declare class HeyMonacoDiffEditor extends EditorBase<editor.IStandaloneDiffEditor> {
/**
* @internal
*/
protected readonly PROPERTY_CHANGE_HANDLER_DICT: {
[propertyName: string]: (value: any) => void;
};
/**
* @internal
*/
protected editorContainerRef: import("lit/directives/ref.js").Ref<HTMLDivElement>;
/**
* After component loaded, the model for the orignal can be obtained using this property.
*/
originalModel?: editor.ITextModel;
/**
* After component loaded, the model for the modified can be obtained using this property.
*/
modifiedModel?: editor.ITextModel;
/**
* The value of original model for the editor.
*/
original?: string;
/**
* The language of original model for the editor.
*/
originalLanguage?: string;
/**
* The value of modified model for the editor.
*/
modified?: string;
/**
* The language of modified model for the editor.
*/
modifiedLanguage?: string;
options?: EditorOptions;
protected loadEditor(editorContainer?: HTMLDivElement): Promise<void>;
protected defineEvents(): void;
}
declare global {
interface HTMLElementTagNameMap {
'hey-monaco-diff-editor': HeyMonacoDiffEditor;
}
}
export {};