refactor(types): use stricter settings

fix #847
This commit is contained in:
Evan You
2020-03-23 11:08:22 -04:00
parent b3890a93e3
commit b8c1be18f3
27 changed files with 385 additions and 381 deletions

View File

@@ -63,7 +63,7 @@ export interface ClassComponent {
__vccOpts: ComponentOptions
}
export type Component = ComponentOptions | FunctionalComponent
export type Component = ComponentOptions | FunctionalComponent<any>
// A type used in public APIs where a component type is expected.
// The constructor type is an artificial type returned by defineComponent().
@@ -100,7 +100,10 @@ export interface SetupContext {
}
export type RenderFunction = {
(): VNodeChild
(
ctx: ComponentPublicInstance,
cache: ComponentInternalInstance['renderCache']
): VNodeChild
_rc?: boolean // isRuntimeCompiled
}