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