Skip to content

Commit 7e7db8e

Browse files
committed
feat(ts): added ts type
1 parent 9e2b66e commit 7e7db8e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import _CodeMirror from "codemirror";
22
import type { App } from "vue";
3-
import type { EditorConfiguration } from "codemirror";
3+
import type { EditorConfiguration, Editor } from "codemirror";
44
import VueCodemirror from "./src/components/index.vue";
55
import "./src/style/index.css";
66

7+
interface CmComp {
8+
cminstance: Editor;
9+
resize: (
10+
width?: string | number | null,
11+
height?: string | number | null
12+
) => void;
13+
refresh: () => void;
14+
destroy: () => void;
15+
}
16+
export type CmComponentRef = CmComp | null;
717
declare interface InstallConfig {
818
options: EditorConfiguration;
919
componentName: string;

0 commit comments

Comments
 (0)