how to use in ts
Closed this issue · 1 comments
bhabgs commented
tvc12 commented
👉 Copy code in below into shims-vue.d.ts
declare module 'monaco-editor-vue' {
import Vue from 'vue';
import {Prop} from 'vue-property-decorator';
const noop;
class MonacoEditor extends Vue {
@Prop({type: Boolean, default: false}) diffEditor: boolean;
@Prop({type: [String, Number], default: '100%'}) width: string | number;
@Prop({type: [String, Number], default: '100%'}) height: string | number;
@Prop({type: String}) original: string;
@Prop({type: String}) value: string;
@Prop({type: String, default: 'javascript'}) language: string;
@Prop({type: String, default: 'vs'}) theme: string;
@Prop({
type: Object, default: () => {
return {};
}
}) options: any;
@Prop({type: Function, default: noop}) editorMounted: Function;
@Prop({type: Function, default: noop}) editorBeforeMount: Function;
}
export const monaco;
export default MonacoEditor;
}