forked from vuejs/vue-element
-
Notifications
You must be signed in to change notification settings - Fork 187
/
index.d.ts
34 lines (29 loc) · 1.32 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Type definitions for vue-custom-element 1.2.1
// Definitions by: Isaac Lyman http://isaaclyman.com
import Vue from 'vue'
import { ComponentOptions, PluginFunction } from 'vue'
declare class VueCustomElement {
static install: PluginFunction<never>;
}
declare namespace VueCustomElement {
interface options {
constructorCallback?: () => void;
connectedCallback?: () => void;
disconnectedCallback?: () => void;
attributeChangedCallback?: (name: string, oldValue: any, value: any) => void;
beforeCreateVueInstance?: (rootElement: ComponentOptions<Vue>) => ComponentOptions<Vue> | Promise<ComponentOptions<Vue>>;
vueInstanceCreatedCallback?: () => void;
destroyTimeout?: number;
props?: ComponentOptions<Vue>['props'];
shadow?: boolean;
shadowCss?: string;
}
}
declare module 'vue/types/vue' {
export interface VueConstructor {
customElement(tag: string, componentDefinition: ComponentOptions<Vue>, options?: VueCustomElement.options): void;
customElement(tag: string, singleFileComponent: VueConstructor<Vue>, options?: VueCustomElement.options): void;
customElement(tag: string, asyncComponentDefinition: () => Promise<ComponentOptions<Vue>>, options?: VueCustomElement.options): void;
}
}
export default VueCustomElement