refactor: adjust internal vnode types + more dts tests

This commit is contained in:
Evan You
2019-11-04 18:38:55 -05:00
parent 957d3a0547
commit dfc7c0f12a
23 changed files with 489 additions and 318 deletions

View File

@@ -83,7 +83,7 @@ export type ComponentOptionsWithoutProps<
M extends MethodOptions = {}
> = ComponentOptionsBase<Props, RawBindings, D, C, M> & {
props?: undefined
} & ThisType<ComponentPublicInstance<Props, RawBindings, D, C, M>>
} & ThisType<ComponentPublicInstance<{}, RawBindings, D, C, M, Props>>
export type ComponentOptionsWithArrayProps<
PropNames extends string = string,
@@ -459,7 +459,7 @@ function createWatcher(
ctx: ComponentPublicInstance,
key: string
) {
const getter = () => ctx[key]
const getter = () => (ctx as Data)[key]
if (isString(raw)) {
const handler = renderContext[raw]
if (isFunction(handler)) {