forked from karol-f/vue-custom-element
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
32 lines (27 loc) · 1.14 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
// 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;
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