diff --git a/packages/compiler-ssr/src/transforms/ssrTransformSuspense.ts b/packages/compiler-ssr/src/transforms/ssrTransformSuspense.ts index c590eabea11..33543326922 100644 --- a/packages/compiler-ssr/src/transforms/ssrTransformSuspense.ts +++ b/packages/compiler-ssr/src/transforms/ssrTransformSuspense.ts @@ -32,7 +32,7 @@ export function ssrTransformSuspense( return () => { if (node.children.length) { const wipEntry: WIPEntry = { - slotsExp: null as any, + slotsExp: null!, // to be immediately set wipSlots: [] } wipMap.set(node, wipEntry) diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 74b3eb7f5d7..16b2333051d 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -475,7 +475,7 @@ export function createComponentInstance( emitsOptions: normalizeEmitsOptions(type, appContext), // emit - emit: null as any, // to be set immediately + emit: null!, // to be set immediately emitted: null, // props default value diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index c10ef97d0e3..db12bfbcf51 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -651,7 +651,7 @@ export function applyOptions(instance: ComponentInternalInstance) { `Plain object usage is no longer supported.` ) } - const data = (dataOptions as any).call(publicThis, publicThis) + const data = dataOptions.call(publicThis, publicThis) if (__DEV__ && isPromise(data)) { warn( `data() returned a Promise - note data() cannot be async; If you ` + diff --git a/packages/runtime-dom/src/directives/vOn.ts b/packages/runtime-dom/src/directives/vOn.ts index d4567f839f4..06e596266cf 100644 --- a/packages/runtime-dom/src/directives/vOn.ts +++ b/packages/runtime-dom/src/directives/vOn.ts @@ -66,8 +66,7 @@ export const withKeys = (fn: Function, modifiers: string[]) => { compatUtils.isCompatEnabled(DeprecationTypes.CONFIG_KEY_CODES, instance) ) { if (instance) { - globalKeyCodes = (instance.appContext.config as any as LegacyConfig) - .keyCodes + globalKeyCodes = (instance.appContext.config as LegacyConfig).keyCodes } } if (__DEV__ && modifiers.some(m => /^\d+$/.test(m))) { diff --git a/packages/vue/__tests__/e2eUtils.ts b/packages/vue/__tests__/e2eUtils.ts index 583edb030ec..9ae3cc7fd3e 100644 --- a/packages/vue/__tests__/e2eUtils.ts +++ b/packages/vue/__tests__/e2eUtils.ts @@ -41,7 +41,7 @@ export function setupPuppeteer() { page.on('console', e => { if (e.type() === 'error') { - const err = e.args()[0] as any + const err = e.args()[0] console.error( `Error from Puppeteer-loaded page:\n`, err._remoteObject.description