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

View File

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