mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 03:51:47 -06:00
Fix compile errors
This commit is contained in:
parent
077862736d
commit
6c9ba46e8b
@ -11546,7 +11546,7 @@ namespace ts {
|
||||
if (isBindingPattern(declaration.parent)) {
|
||||
const parentDeclaration = declaration.parent.parent;
|
||||
const name = declaration.propertyName || declaration.name;
|
||||
if (isVariableLike(parentDeclaration) &&
|
||||
if (parentDeclaration.kind !== SyntaxKind.BindingElement &&
|
||||
parentDeclaration.type &&
|
||||
!isBindingPattern(name)) {
|
||||
const text = getTextOfPropertyName(name);
|
||||
|
||||
@ -370,8 +370,8 @@ namespace ts.BreakpointResolver {
|
||||
}
|
||||
|
||||
function textSpanFromVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan {
|
||||
const declarations = variableDeclaration.parent.declarations;
|
||||
if (declarations && declarations[0] === variableDeclaration) {
|
||||
if (variableDeclaration.parent.kind === SyntaxKind.VariableDeclarationList &&
|
||||
variableDeclaration.parent.declarations[0] === variableDeclaration) {
|
||||
// First declaration - include let keyword
|
||||
return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration);
|
||||
}
|
||||
@ -400,8 +400,8 @@ namespace ts.BreakpointResolver {
|
||||
return textSpanFromVariableDeclaration(variableDeclaration);
|
||||
}
|
||||
|
||||
const declarations = variableDeclaration.parent.declarations;
|
||||
if (declarations && declarations[0] !== variableDeclaration) {
|
||||
if (variableDeclaration.parent.kind === SyntaxKind.VariableDeclarationList &&
|
||||
variableDeclaration.parent.declarations[0] !== variableDeclaration) {
|
||||
// If we cannot set breakpoint on this declaration, set it on previous one
|
||||
// Because the variable declaration may be binding pattern and
|
||||
// we would like to set breakpoint in last binding element if that's the case,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user