@@ -6189,6 +6189,15 @@ var ts;
61896189 return !!node && (node.kind === 162 /* ArrayBindingPattern */ || node.kind === 161 /* ObjectBindingPattern */);
61906190 }
61916191 ts.isBindingPattern = isBindingPattern;
6192+ function isNodeDescendentOf(node, ancestor) {
6193+ while (node) {
6194+ if (node === ancestor)
6195+ return true;
6196+ node = node.parent;
6197+ }
6198+ return false;
6199+ }
6200+ ts.isNodeDescendentOf = isNodeDescendentOf;
61926201 function isInAmbientContext(node) {
61936202 while (node) {
61946203 if (node.flags & (2 /* Ambient */ | 8192 /* DeclarationFile */)) {
@@ -17284,7 +17293,8 @@ var ts;
1728417293 var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
1728517294 var parent = container && container.parent;
1728617295 if (parent && (ts.isClassLike(parent) || parent.kind === 215 /* InterfaceDeclaration */)) {
17287- if (!(container.flags & 128 /* Static */)) {
17296+ if (!(container.flags & 128 /* Static */) &&
17297+ (container.kind !== 144 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) {
1728817298 return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
1728917299 }
1729017300 }
@@ -29492,16 +29502,8 @@ var ts;
2949229502 diagnostics: diagnostics,
2949329503 sourceMaps: sourceMapDataList
2949429504 };
29495- function isNodeDescendentOf(node, ancestor) {
29496- while (node) {
29497- if (node === ancestor)
29498- return true;
29499- node = node.parent;
29500- }
29501- return false;
29502- }
2950329505 function isUniqueLocalName(name, container) {
29504- for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
29506+ for (var node = container; ts. isNodeDescendentOf(node, container); node = node.nextContainer) {
2950529507 if (node.locals && ts.hasProperty(node.locals, name)) {
2950629508 // We conservatively include alias symbols to cover cases where they're emitted as locals
2950729509 if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) {
0 commit comments