@effect/language-service 0.55.1 → 0.55.2

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
@@ -7169,8 +7169,20 @@ var missedPipeableOpportunity = createDiagnostic({
7169
7169
  while (nodeToVisit.length > 0) {
7170
7170
  const node = nodeToVisit.shift();
7171
7171
  if (ts.isCallExpression(node) && node.arguments.length === 1) {
7172
- const parentChain = callChainNodes.get(node) || [];
7173
- callChainNodes.set(node.arguments[0], parentChain.concat(node));
7172
+ const isPipeCall = yield* pipe(typeParser.pipeCall(node), orElse2(() => void_));
7173
+ if (!isPipeCall) {
7174
+ const resolvedSignature = typeChecker.getResolvedSignature(node);
7175
+ if (resolvedSignature) {
7176
+ const returnType = typeChecker.getReturnTypeOfSignature(resolvedSignature);
7177
+ if (returnType) {
7178
+ const callSignatures = typeChecker.getSignaturesOfType(returnType, ts.SignatureKind.Call);
7179
+ if (callSignatures.length === 0) {
7180
+ const parentChain = callChainNodes.get(node) || [];
7181
+ callChainNodes.set(node.arguments[0], parentChain.concat(node));
7182
+ }
7183
+ }
7184
+ }
7185
+ }
7174
7186
  } else if (callChainNodes.has(node) && ts.isExpression(node)) {
7175
7187
  const parentChain = (callChainNodes.get(node) || []).slice();
7176
7188
  const originalParentChain = parentChain.slice();