@effect/language-service 0.66.1 → 0.67.0
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/README.md +3 -0
- package/cli.js +535 -336
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +14 -3
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +14 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +14 -3
- package/transform.js.map +1 -1
package/index.js
CHANGED
|
@@ -8467,9 +8467,20 @@ var effectFnOpportunity = createDiagnostic({
|
|
|
8467
8467
|
if (!traceName) return yield* TypeParserIssue.issue;
|
|
8468
8468
|
const opportunity = yield* pipe(
|
|
8469
8469
|
tryParseGenOpportunity(node),
|
|
8470
|
-
orElse2(
|
|
8471
|
-
()
|
|
8472
|
-
|
|
8470
|
+
orElse2(() => {
|
|
8471
|
+
if (ts.isArrowFunction(node) && !ts.isBlock(node.body)) {
|
|
8472
|
+
return TypeParserIssue.issue;
|
|
8473
|
+
}
|
|
8474
|
+
const body = ts.isArrowFunction(node) ? node.body : node.body;
|
|
8475
|
+
if (!body || !ts.isBlock(body) || body.statements.length <= 5) {
|
|
8476
|
+
return TypeParserIssue.issue;
|
|
8477
|
+
}
|
|
8478
|
+
return succeed({
|
|
8479
|
+
effectModuleName: sourceEffectModuleName,
|
|
8480
|
+
pipeArguments: [],
|
|
8481
|
+
generatorFunction: void 0
|
|
8482
|
+
});
|
|
8483
|
+
})
|
|
8473
8484
|
);
|
|
8474
8485
|
return {
|
|
8475
8486
|
node,
|