chore(types): remove unnecessary type assertions (#4336)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 ` +
|
||||
|
||||
Reference in New Issue
Block a user