@esportsplus/typescript 0.33.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -32,13 +32,13 @@ function refsSym(env, expr, sym) {
|
|
|
32
32
|
}
|
|
33
33
|
return env.checker.getSymbolAtLocation(e) === sym;
|
|
34
34
|
}
|
|
35
|
-
function containsMatch(node, pred) {
|
|
35
|
+
function containsMatch(node, pred, descendIntoFunctions = false) {
|
|
36
36
|
let found = false;
|
|
37
37
|
const rec = (n) => {
|
|
38
38
|
if (found) {
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
if (n !== node && isFunctionLike(n)) {
|
|
41
|
+
if (n !== node && !descendIntoFunctions && isFunctionLike(n)) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
if (pred(n)) {
|
|
@@ -405,7 +405,7 @@ function hasMatchingRelease(env, acquireCall, acq) {
|
|
|
405
405
|
const acquireExpressionText = ts.isPropertyAccessExpression(acqCallee)
|
|
406
406
|
? acqCallee.expression.getText()
|
|
407
407
|
: undefined;
|
|
408
|
-
return containsMatch(body, (n) => isReleaseCallForPair(n, acq, acquireCall, acquireExpressionText));
|
|
408
|
+
return containsMatch(body, (n) => isReleaseCallForPair(n, acq, acquireCall, acquireExpressionText), true);
|
|
409
409
|
}
|
|
410
410
|
function classDischargesField(cls, field, acq) {
|
|
411
411
|
const members = cls.members ?? [];
|