import { InjectOptions, propertyDecorator, Vue } from './index'; import { constructor } from './utils'; export interface RefOptions { from: string; } export function ref(options: Partial | T, property?: string) { return propertyDecorator(options, (options, target, property) => { const Component = constructor(target); if (!Object.hasOwn(Component, 'refs')) { Component.refs = {}; } Component.refs[property] = options; }, property); }