UNPKG

1.71 kBTypeScriptView Raw
1import Vue, { ComponentOptions } from 'vue';
2import { VueClass } from './declarations';
3export declare const noop: () => void;
4export declare const hasProto: boolean;
5export interface VueDecorator {
6 (Ctor: typeof Vue): void;
7 (target: Vue, key: string): void;
8 (target: Vue, key: string, index: number): void;
9}
10export declare function createDecorator(factory: (options: ComponentOptions<Vue>, key: string, index: number) => void): VueDecorator;
11export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
12export declare type ExtractInstance<T> = T extends VueClass<infer V> ? V : never;
13export declare type MixedVueClass<Mixins extends VueClass<Vue>[]> = Mixins extends (infer T)[] ? VueClass<UnionToIntersection<ExtractInstance<T>>> : never;
14export declare function mixins<A>(CtorA: VueClass<A>): VueClass<A>;
15export declare function mixins<A, B>(CtorA: VueClass<A>, CtorB: VueClass<B>): VueClass<A & B>;
16export declare function mixins<A, B, C>(CtorA: VueClass<A>, CtorB: VueClass<B>, CtorC: VueClass<C>): VueClass<A & B & C>;
17export declare function mixins<A, B, C, D>(CtorA: VueClass<A>, CtorB: VueClass<B>, CtorC: VueClass<C>, CtorD: VueClass<D>): VueClass<A & B & C & D>;
18export declare function mixins<A, B, C, D, E>(CtorA: VueClass<A>, CtorB: VueClass<B>, CtorC: VueClass<C>, CtorD: VueClass<D>, CtorE: VueClass<E>): VueClass<A & B & C & D & E>;
19export declare function mixins<T>(...Ctors: VueClass<Vue>[]): VueClass<T>;
20export declare function mixins<T extends VueClass<Vue>[]>(...Ctors: T): MixedVueClass<T>;
21export declare function isPrimitive(value: any): boolean;
22export declare function warn(message: string): void;