chore: lint for unused arguments

This commit is contained in:
Evan You
2020-06-12 16:31:31 -04:00
parent 825ec1500f
commit 91fa52850a
7 changed files with 13 additions and 62 deletions

View File

@@ -239,7 +239,6 @@ const isElementRoot = (vnode: VNode) => {
export function shouldUpdateComponent(
prevVNode: VNode,
nextVNode: VNode,
parentComponent: ComponentInternalInstance | null,
optimized?: boolean
): boolean {
const { props: prevProps, children: prevChildren } = prevVNode

View File

@@ -48,7 +48,7 @@ export function registerHMR(instance: ComponentInternalInstance) {
const id = instance.type.__hmrId!
let record = map.get(id)
if (!record) {
createRecord(id, instance.type as ComponentOptions)
createRecord(id)
record = map.get(id)!
}
record.add(instance)
@@ -58,7 +58,7 @@ export function unregisterHMR(instance: ComponentInternalInstance) {
map.get(instance.type.__hmrId!)!.delete(instance)
}
function createRecord(id: string, comp: ComponentOptions): boolean {
function createRecord(id: string): boolean {
if (map.has(id)) {
return false
}

View File

@@ -1109,7 +1109,7 @@ function baseCreateRenderer(
)
}
} else {
updateComponent(n1, n2, parentComponent, optimized)
updateComponent(n1, n2, optimized)
}
}
@@ -1185,14 +1185,9 @@ function baseCreateRenderer(
}
}
const updateComponent = (
n1: VNode,
n2: VNode,
parentComponent: ComponentInternalInstance | null,
optimized: boolean
) => {
const updateComponent = (n1: VNode, n2: VNode, optimized: boolean) => {
const instance = (n2.component = n1.component)!
if (shouldUpdateComponent(n1, n2, parentComponent, optimized)) {
if (shouldUpdateComponent(n1, n2, optimized)) {
if (
__FEATURE_SUSPENSE__ &&
instance.asyncDep &&