fix: types
This commit is contained in:
parent
31deb48a89
commit
87519fa279
|
@ -649,12 +649,12 @@ export function compileScript(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (child.type === 'Identifier') {
|
if (child.type === 'Identifier') {
|
||||||
if (parent.type === 'VariableDeclarator') {
|
if (parent!.type === 'VariableDeclarator') {
|
||||||
withDefaultsVariables[child.name] = {
|
withDefaultsVariables[child.name] = {
|
||||||
node
|
node
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
parent.type === 'CallExpression' &&
|
parent!.type === 'CallExpression' &&
|
||||||
parent.callee.type === 'Identifier' &&
|
parent.callee.type === 'Identifier' &&
|
||||||
parent.callee.name === WITH_DEFAULTS &&
|
parent.callee.name === WITH_DEFAULTS &&
|
||||||
withDefaultsVariables[child.name]
|
withDefaultsVariables[child.name]
|
||||||
|
@ -664,7 +664,7 @@ export function compileScript(
|
||||||
variable.needHoist = true
|
variable.needHoist = true
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (
|
||||||
parent.type !== 'VariableDeclaration' &&
|
parent!.type !== 'VariableDeclaration' &&
|
||||||
withDefaultsVariables[child.name]
|
withDefaultsVariables[child.name]
|
||||||
) {
|
) {
|
||||||
const variable = withDefaultsVariables[child.name]
|
const variable = withDefaultsVariables[child.name]
|
||||||
|
|
Loading…
Reference in New Issue