@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
|
@@ -4997,9 +4997,20 @@ var effectFnOpportunity = createDiagnostic({
|
|
|
4997
4997
|
if (!traceName) return yield* TypeParserIssue.issue;
|
|
4998
4998
|
const opportunity = yield* pipe(
|
|
4999
4999
|
tryParseGenOpportunity(node),
|
|
5000
|
-
orElse2(
|
|
5001
|
-
()
|
|
5002
|
-
|
|
5000
|
+
orElse2(() => {
|
|
5001
|
+
if (ts.isArrowFunction(node) && !ts.isBlock(node.body)) {
|
|
5002
|
+
return TypeParserIssue.issue;
|
|
5003
|
+
}
|
|
5004
|
+
const body = ts.isArrowFunction(node) ? node.body : node.body;
|
|
5005
|
+
if (!body || !ts.isBlock(body) || body.statements.length <= 5) {
|
|
5006
|
+
return TypeParserIssue.issue;
|
|
5007
|
+
}
|
|
5008
|
+
return succeed({
|
|
5009
|
+
effectModuleName: sourceEffectModuleName,
|
|
5010
|
+
pipeArguments: [],
|
|
5011
|
+
generatorFunction: void 0
|
|
5012
|
+
});
|
|
5013
|
+
})
|
|
5003
5014
|
);
|
|
5004
5015
|
return {
|
|
5005
5016
|
node,
|