@effect/language-service 0.38.0 → 0.38.1
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/effect-lsp-patch-utils.js +9 -11
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +9 -11
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +9 -11
- package/transform.js.map +1 -1
package/index.js
CHANGED
|
@@ -2622,8 +2622,7 @@ function make3(ts, tsUtils, typeChecker, typeCheckerUtils) {
|
|
|
2622
2622
|
node,
|
|
2623
2623
|
effectModule,
|
|
2624
2624
|
generatorFunction,
|
|
2625
|
-
body: generatorFunction.body
|
|
2626
|
-
functionStar: generatorFunction.getFirstToken()
|
|
2625
|
+
body: generatorFunction.body
|
|
2627
2626
|
}))
|
|
2628
2627
|
);
|
|
2629
2628
|
},
|
|
@@ -2670,8 +2669,7 @@ function make3(ts, tsUtils, typeChecker, typeCheckerUtils) {
|
|
|
2670
2669
|
node,
|
|
2671
2670
|
effectModule,
|
|
2672
2671
|
generatorFunction,
|
|
2673
|
-
body: generatorFunction.body
|
|
2674
|
-
functionStar: generatorFunction.getFirstToken()
|
|
2672
|
+
body: generatorFunction.body
|
|
2675
2673
|
}))
|
|
2676
2674
|
);
|
|
2677
2675
|
},
|
|
@@ -2723,8 +2721,7 @@ function make3(ts, tsUtils, typeChecker, typeCheckerUtils) {
|
|
|
2723
2721
|
node,
|
|
2724
2722
|
generatorFunction,
|
|
2725
2723
|
effectModule,
|
|
2726
|
-
body: generatorFunction.body
|
|
2727
|
-
functionStar: generatorFunction.getFirstToken()
|
|
2724
|
+
body: generatorFunction.body
|
|
2728
2725
|
}))
|
|
2729
2726
|
);
|
|
2730
2727
|
},
|
|
@@ -4564,6 +4561,7 @@ var missingStarInYieldEffectGen = createDiagnostic({
|
|
|
4564
4561
|
apply: fn("missingStarInYieldEffectGen.apply")(function* (sourceFile, report) {
|
|
4565
4562
|
const ts = yield* service(TypeScriptApi);
|
|
4566
4563
|
const typeParser = yield* service(TypeParser);
|
|
4564
|
+
const tsUtils = yield* service(TypeScriptUtils);
|
|
4567
4565
|
const brokenGenerators = /* @__PURE__ */ new Set();
|
|
4568
4566
|
const brokenYields = /* @__PURE__ */ new Set();
|
|
4569
4567
|
const nodeToVisit = [];
|
|
@@ -4586,9 +4584,9 @@ var missingStarInYieldEffectGen = createDiagnostic({
|
|
|
4586
4584
|
typeParser.effectGen(effectGenNode),
|
|
4587
4585
|
orElse2(() => typeParser.effectFnUntracedGen(effectGenNode)),
|
|
4588
4586
|
orElse2(() => typeParser.effectFnGen(effectGenNode)),
|
|
4589
|
-
map3(({
|
|
4590
|
-
if (
|
|
4591
|
-
brokenGenerators.add(
|
|
4587
|
+
map3(({ generatorFunction }) => {
|
|
4588
|
+
if (generatorFunction) {
|
|
4589
|
+
brokenGenerators.add(ts.getTokenPosOfNode(generatorFunction, tsUtils.getSourceFileOfNode(node)));
|
|
4592
4590
|
}
|
|
4593
4591
|
brokenYields.add(node);
|
|
4594
4592
|
}),
|
|
@@ -4598,8 +4596,8 @@ var missingStarInYieldEffectGen = createDiagnostic({
|
|
|
4598
4596
|
}
|
|
4599
4597
|
}
|
|
4600
4598
|
brokenGenerators.forEach(
|
|
4601
|
-
(
|
|
4602
|
-
location:
|
|
4599
|
+
(pos) => report({
|
|
4600
|
+
location: { pos, end: pos + "function".length },
|
|
4603
4601
|
messageText: `Seems like you used yield instead of yield* inside this Effect.gen.`,
|
|
4604
4602
|
fixes: []
|
|
4605
4603
|
})
|