-
- Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.7.2
Steps to reproduce
const ConfigProvider = defineComponent({}); function install(app: VueConstructor) { app.component('ConfigProvider', ConfigProvider); } This will throw Error:
error TS2345: Argument of type 'DefineComponent<{ getContainer: { type: FunctionConstructor; }; }, Data, Data, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<...>, {}>' is not assignable to parameter of type 'VueConstructor<Vue>'. Type 'ComponentPublicInstanceConstructor<{ $data: Data; $props: Readonly<Partial<{}> & Omit<Readonly<ExtractPropTypes<{ getContainer: { type: FunctionConstructor; }; }>>, never>>; ... 10 more ...; $watch(source: string | Function, cb: Function, options?: WatchOptions<...>): WatchStopHandle; } & ... 5 more ... & Readonly<....' is missing the following properties from type 'VueConstructor<Vue>': extend, nextTick, set, delete, and 10 more. What is expected?
defineComponent({}) return type should match Vue.component(id, component) second params
What is actually happening?
mismatch
Additional comments
Vue2.7.0 works well because of defineComponent which returns VueProxy<{}, RawBindings, D, C, M, Mixin, Extends, Emits>
Metadata
Metadata
Assignees
Labels
No labels