types: improve types

This commit is contained in:
Evan You
2019-10-21 23:37:03 -04:00
parent bc0ec27739
commit a25b1371ab
2 changed files with 8 additions and 8 deletions

View File

@@ -368,7 +368,7 @@ export function applyOptions(
function callSyncHook(
name: 'beforeCreate' | 'created',
options: ComponentOptions,
ctx: any,
ctx: ComponentPublicInstance,
globalMixins: ComponentOptions[]
) {
callHookFromMixins(name, globalMixins, ctx)
@@ -389,7 +389,7 @@ function callSyncHook(
function callHookFromMixins(
name: 'beforeCreate' | 'created',
mixins: ComponentOptions[],
ctx: any
ctx: ComponentPublicInstance
) {
for (let i = 0; i < mixins.length; i++) {
const fn = mixins[i][name]