@effect/language-service 0.55.0 → 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/cli.js +17 -6
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +17 -6
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +17 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +17 -6
- package/transform.js.map +1 -1
package/cli.js
CHANGED
|
@@ -33871,13 +33871,24 @@ var missedPipeableOpportunity = createDiagnostic({
|
|
|
33871
33871
|
const callChainNodes = /* @__PURE__ */ new WeakMap();
|
|
33872
33872
|
while (nodeToVisit.length > 0) {
|
|
33873
33873
|
const node = nodeToVisit.shift();
|
|
33874
|
-
if (ts.isCallExpression(node) && node.arguments.length === 1
|
|
33875
|
-
const
|
|
33876
|
-
|
|
33877
|
-
|
|
33878
|
-
|
|
33874
|
+
if (ts.isCallExpression(node) && node.arguments.length === 1) {
|
|
33875
|
+
const isPipeCall = yield* pipe(typeParser.pipeCall(node), orElse14(() => void_8));
|
|
33876
|
+
if (!isPipeCall) {
|
|
33877
|
+
const resolvedSignature = typeChecker.getResolvedSignature(node);
|
|
33878
|
+
if (resolvedSignature) {
|
|
33879
|
+
const returnType = typeChecker.getReturnTypeOfSignature(resolvedSignature);
|
|
33880
|
+
if (returnType) {
|
|
33881
|
+
const callSignatures = typeChecker.getSignaturesOfType(returnType, ts.SignatureKind.Call);
|
|
33882
|
+
if (callSignatures.length === 0) {
|
|
33883
|
+
const parentChain = callChainNodes.get(node) || [];
|
|
33884
|
+
callChainNodes.set(node.arguments[0], parentChain.concat(node));
|
|
33885
|
+
}
|
|
33886
|
+
}
|
|
33887
|
+
}
|
|
33888
|
+
}
|
|
33889
|
+
} else if (callChainNodes.has(node) && ts.isExpression(node)) {
|
|
33890
|
+
const parentChain = (callChainNodes.get(node) || []).slice();
|
|
33879
33891
|
const originalParentChain = parentChain.slice();
|
|
33880
|
-
parentChain.push(node);
|
|
33881
33892
|
while (parentChain.length > options3.pipeableMinArgCount) {
|
|
33882
33893
|
const subject = parentChain.pop();
|
|
33883
33894
|
const resultType = typeChecker.getTypeAtLocation(subject);
|