types: fix types

This commit is contained in:
Evan You 2018-09-26 10:55:07 -04:00
parent 9e62c3bd9a
commit 7a1c34690a
2 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import { EMPTY_OBJ } from './utils'
import { computed, stop, ComputedGetter } from '@vue/observer'
import { Component, ComponentClass } from './component'
import { ComponentClass, MountedComponent } from './component'
import { ComponentComputedOptions } from './componentOptions'
const extractionCache: WeakMap<
@ -30,7 +30,7 @@ export function getComputedOptions(
}
export function initializeComputed(
instance: Component,
instance: MountedComponent,
computedOptions: ComponentComputedOptions | undefined
) {
if (!computedOptions) {
@ -56,7 +56,7 @@ export function initializeComputed(
)
}
export function teardownComputed(instance: Component) {
export function teardownComputed(instance: MountedComponent) {
const handles = instance._computedGetters
if (handles !== null) {
for (const key in handles) {

View File

@ -1,6 +1,5 @@
import { EMPTY_OBJ, nativeOnRE, vnodeHookRE } from './utils'
import {
Component,
ComponentClass,
MountedComponent,
FunctionalComponent
@ -13,7 +12,7 @@ import {
PropOptions
} from './componentOptions'
export function initializeProps(instance: Component, data: Data | null) {
export function initializeProps(instance: MountedComponent, data: Data | null) {
const { props, attrs } = resolveProps(
data,
instance.$options.props,