1 |
|
2 |
|
3 | import {
|
4 | VueConstructor,
|
5 | ComponentOptions,
|
6 | FunctionalComponentOptions,
|
7 | VNodeData,
|
8 | } from 'vue'
|
9 | import { CombinedVueInstance, Vue } from 'vue/types/vue'
|
10 | import {
|
11 | RecordPropsDefinition,
|
12 | ThisTypedComponentOptionsWithArrayProps,
|
13 | ThisTypedComponentOptionsWithRecordProps,
|
14 | } from 'vue/types/options'
|
15 | import { MetaInfo } from 'vue-meta/types'
|
16 | import { TouchStoredHandlers } from './directives/touch'
|
17 |
|
18 | declare global {
|
19 | interface Window {
|
20 | Vue: VueConstructor
|
21 | }
|
22 |
|
23 | interface HTMLCollection {
|
24 | [Symbol.iterator] (): IterableIterator<Element>
|
25 | }
|
26 |
|
27 | interface Element {
|
28 | getElementsByClassName(classNames: string): NodeListOf<HTMLElement>
|
29 | }
|
30 |
|
31 | interface HTMLElement {
|
32 | _clickOutside?: EventListenerOrEventListenerObject
|
33 | _onResize?: {
|
34 | callback: () => void
|
35 | options?: boolean | AddEventListenerOptions
|
36 | }
|
37 | _ripple?: {
|
38 | enabled?: boolean
|
39 | centered?: boolean
|
40 | class?: string
|
41 | circle?: boolean
|
42 | touched?: boolean
|
43 | isTouch?: boolean
|
44 | }
|
45 | _observe?: {
|
46 | init: boolean
|
47 | observer: IntersectionObserver
|
48 | }
|
49 | _mutate?: {
|
50 | observer: MutationObserver
|
51 | }
|
52 | _onScroll?: {
|
53 | callback: EventListenerOrEventListenerObject
|
54 | options: boolean | AddEventListenerOptions
|
55 | target: EventTarget
|
56 | }
|
57 | _touchHandlers?: {
|
58 | [_uid: number]: TouchStoredHandlers
|
59 | }
|
60 | }
|
61 |
|
62 | interface WheelEvent {
|
63 | path?: EventTarget[]
|
64 | }
|
65 |
|
66 | function parseInt(s: string | number, radix?: number): number
|
67 | function parseFloat(string: string | number): number
|
68 |
|
69 | export type Dictionary<T> = Record<string, T>
|
70 |
|
71 | export const __VUETIFY_VERSION__: string
|
72 | export const __REQUIRED_VUE__: string
|
73 | }
|
74 |
|
75 | declare module 'vue/types/vnode' {
|
76 | export interface VNodeData {
|
77 | model?: {
|
78 | callback: (v: any) => void
|
79 | expression: string
|
80 | value: any
|
81 | }
|
82 | }
|
83 | }
|
84 |
|
85 | declare module 'vue/types/options' {
|
86 | interface ComponentOptions<V extends Vue> {
|
87 | head?: MetaInfo | (() => MetaInfo)
|
88 | }
|
89 | }
|
90 |
|
91 | declare module 'vue/types/vue' {
|
92 | export type OptionsVue<Instance extends Vue, Data, Methods, Computed, Props, Options = {}> = VueConstructor<
|
93 | CombinedVueInstance<Instance, Data, Methods, Computed, Props> & Vue,
|
94 | Options
|
95 | >
|
96 |
|
97 | export interface Vue {
|
98 | _uid: number
|
99 | _isDestroyed: boolean
|
100 |
|
101 | /** bindObjectProps */
|
102 | _b (
|
103 | data: VNodeData,
|
104 | tag: string,
|
105 | value: Dictionary<any> | Dictionary<any>[],
|
106 | asProp?: boolean,
|
107 | isSync?: boolean
|
108 | ): VNodeData
|
109 |
|
110 | /** bindObjectListeners */
|
111 | _g (data: VNodeData, value: {}): VNodeData
|
112 | }
|
113 |
|
114 | export interface RawComponentOptions<
|
115 | V extends Vue = Vue,
|
116 | Data = {} | undefined,
|
117 | Methods = {} | undefined,
|
118 | Computed = {} | undefined,
|
119 | Props = {} | undefined
|
120 | > {
|
121 | name?: string
|
122 | data: Data
|
123 | methods: Methods
|
124 | computed: {
|
125 | [C in keyof Computed]: (this: V) => Computed[C]
|
126 | }
|
127 | props: Props
|
128 | }
|
129 |
|
130 | interface VueConstructor<
|
131 | V extends Vue = Vue,
|
132 | Options = Record<string, any>
|
133 | > {
|
134 | version: string
|
135 |
|
136 | $_vuetify_subcomponents?: Record<string, VueConstructor>
|
137 |
|
138 | $_vuetify_installed?: true
|
139 | options: Options
|
140 |
|
141 | extend<Data, Methods, Computed, Options, PropNames extends string = never> (options?: ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames> & Options): OptionsVue<V, Data, Methods, Computed, Record<PropNames, any>, Options>
|
142 | extend<Data, Methods, Computed, Props, Options> (options?: ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props> & Options): OptionsVue<V, Data, Methods, Computed, Props, Options>
|
143 | extend<Options, PropNames extends string = never> (definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]> & Options): OptionsVue<V, {}, {}, {}, Record<PropNames, any>, Options>
|
144 | extend<Props, Options> (definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>> & Options): OptionsVue<V, {}, {}, {}, Props, Options>
|
145 | extend<V extends Vue = Vue> (options?: ComponentOptions<V> & Options): OptionsVue<V, {}, {}, {}, {}, Options>
|
146 | }
|
147 | }
|