UNPKG

vue3-oop-static

Version:
23 lines (22 loc) 935 B
import { InjectionKey, SetupContext } from 'vue'; /** * 自动绑定this !!!此装饰器必须放在最上面 * @example * \@Autobind() * \@Abc() */ export declare function Autobind(): ClassDecorator & MethodDecorator; export declare function useProps<T>(): T; export declare function useCtx(): SetupContext; export declare function getCurrentApp(): import("vue").App<any> | undefined; export declare function getProtoMetadata(target: any, key: symbol, returnDesc?: boolean): any[]; export declare function getDeepOwnDescriptor(proto: any, key: string): PropertyDescriptor | null; export declare function getEmitsFromProps(defaultProps: Record<string, any> | string[]): string[]; /** * 注入服务 * @param service */ export declare function injectService<T extends { new (...args: any[]): InstanceType<T>; ProviderKey: InjectionKey<InstanceType<T>>; }>(service: T, defaultService?: InstanceType<T>): InstanceType<T>;