chore(types): remove unnecessary type assertions (#4336)
This commit is contained in:
parent
7c4e4514d1
commit
0627765b36
@ -32,7 +32,7 @@ export function ssrTransformSuspense(
|
|||||||
return () => {
|
return () => {
|
||||||
if (node.children.length) {
|
if (node.children.length) {
|
||||||
const wipEntry: WIPEntry = {
|
const wipEntry: WIPEntry = {
|
||||||
slotsExp: null as any,
|
slotsExp: null!, // to be immediately set
|
||||||
wipSlots: []
|
wipSlots: []
|
||||||
}
|
}
|
||||||
wipMap.set(node, wipEntry)
|
wipMap.set(node, wipEntry)
|
||||||
|
@ -475,7 +475,7 @@ export function createComponentInstance(
|
|||||||
emitsOptions: normalizeEmitsOptions(type, appContext),
|
emitsOptions: normalizeEmitsOptions(type, appContext),
|
||||||
|
|
||||||
// emit
|
// emit
|
||||||
emit: null as any, // to be set immediately
|
emit: null!, // to be set immediately
|
||||||
emitted: null,
|
emitted: null,
|
||||||
|
|
||||||
// props default value
|
// props default value
|
||||||
|
@ -651,7 +651,7 @@ export function applyOptions(instance: ComponentInternalInstance) {
|
|||||||
`Plain object usage is no longer supported.`
|
`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)) {
|
if (__DEV__ && isPromise(data)) {
|
||||||
warn(
|
warn(
|
||||||
`data() returned a Promise - note data() cannot be async; If you ` +
|
`data() returned a Promise - note data() cannot be async; If you ` +
|
||||||
|
@ -66,8 +66,7 @@ export const withKeys = (fn: Function, modifiers: string[]) => {
|
|||||||
compatUtils.isCompatEnabled(DeprecationTypes.CONFIG_KEY_CODES, instance)
|
compatUtils.isCompatEnabled(DeprecationTypes.CONFIG_KEY_CODES, instance)
|
||||||
) {
|
) {
|
||||||
if (instance) {
|
if (instance) {
|
||||||
globalKeyCodes = (instance.appContext.config as any as LegacyConfig)
|
globalKeyCodes = (instance.appContext.config as LegacyConfig).keyCodes
|
||||||
.keyCodes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (__DEV__ && modifiers.some(m => /^\d+$/.test(m))) {
|
if (__DEV__ && modifiers.some(m => /^\d+$/.test(m))) {
|
||||||
|
@ -41,7 +41,7 @@ export function setupPuppeteer() {
|
|||||||
|
|
||||||
page.on('console', e => {
|
page.on('console', e => {
|
||||||
if (e.type() === 'error') {
|
if (e.type() === 'error') {
|
||||||
const err = e.args()[0] as any
|
const err = e.args()[0]
|
||||||
console.error(
|
console.error(
|
||||||
`Error from Puppeteer-loaded page:\n`,
|
`Error from Puppeteer-loaded page:\n`,
|
||||||
err._remoteObject.description
|
err._remoteObject.description
|
||||||
|
Loading…
Reference in New Issue
Block a user