Add type definitions

This commit is contained in:
hmsk
2017-12-17 17:21:27 -08:00
parent 9404f0076c
commit af4afc926e
4 changed files with 51 additions and 0 deletions

21
types/index.d.ts vendored Normal file
View File

@@ -0,0 +1,21 @@
import Vue, { PluginObject } from "vue";
declare const VueJSModal: PluginObject<VueJSModalOptions>;
export default VueJSModal;
export declare interface VueJSModalOptions {
componentName?: string;
dialog?: boolean;
}
declare interface VModal {
show(name: string, params?: object): void;
hide(name: string, params?: object): void;
toggle(name: string, params?: object): void;
}
declare module "vue/types/vue" {
interface Vue {
$modal: VModal;
}
}