@effect/language-service 0.55.0 → 0.55.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.
package/index.js CHANGED
@@ -7168,13 +7168,12 @@ var missedPipeableOpportunity = createDiagnostic({
7168
7168
  const callChainNodes = /* @__PURE__ */ new WeakMap();
7169
7169
  while (nodeToVisit.length > 0) {
7170
7170
  const node = nodeToVisit.shift();
7171
- if (ts.isCallExpression(node) && node.arguments.length === 1 && node.parent) {
7172
- const parentChain = callChainNodes.get(node.parent) || [];
7173
- callChainNodes.set(node, parentChain.concat(node));
7174
- } else if (node.parent && callChainNodes.has(node.parent) && ts.isExpression(node)) {
7175
- const parentChain = callChainNodes.get(node.parent) || [];
7171
+ if (ts.isCallExpression(node) && node.arguments.length === 1) {
7172
+ const parentChain = callChainNodes.get(node) || [];
7173
+ callChainNodes.set(node.arguments[0], parentChain.concat(node));
7174
+ } else if (callChainNodes.has(node) && ts.isExpression(node)) {
7175
+ const parentChain = (callChainNodes.get(node) || []).slice();
7176
7176
  const originalParentChain = parentChain.slice();
7177
- parentChain.push(node);
7178
7177
  while (parentChain.length > options.pipeableMinArgCount) {
7179
7178
  const subject = parentChain.pop();
7180
7179
  const resultType = typeChecker.getTypeAtLocation(subject);