fix(types): app.component should accept defineComponent return type

fix #730
This commit is contained in:
Evan You
2020-02-15 21:04:29 -05:00
parent 9d2ac6675a
commit 57ee5df364
3 changed files with 19 additions and 13 deletions

View File

@@ -53,6 +53,13 @@ export interface FunctionalComponent<P = {}> extends SFCInternalOptions {
}
export type Component = ComponentOptions | FunctionalComponent
// A type used in public APIs where a component type is expected.
// The constructor type is an artificial type returned by defineComponent().
export type PublicAPIComponent =
| Component
| { new (): ComponentPublicInstance<any, any, any, any, any> }
export { ComponentOptions }
type LifecycleHook = Function[] | null