@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
|
@@ -2536,8 +2536,7 @@ function make2(ts, tsUtils, typeChecker, typeCheckerUtils) {
|
|
|
2536
2536
|
node,
|
|
2537
2537
|
effectModule,
|
|
2538
2538
|
generatorFunction,
|
|
2539
|
-
body: generatorFunction.body
|
|
2540
|
-
functionStar: generatorFunction.getFirstToken()
|
|
2539
|
+
body: generatorFunction.body
|
|
2541
2540
|
}))
|
|
2542
2541
|
);
|
|
2543
2542
|
},
|
|
@@ -2584,8 +2583,7 @@ function make2(ts, tsUtils, typeChecker, typeCheckerUtils) {
|
|
|
2584
2583
|
node,
|
|
2585
2584
|
effectModule,
|
|
2586
2585
|
generatorFunction,
|
|
2587
|
-
body: generatorFunction.body
|
|
2588
|
-
functionStar: generatorFunction.getFirstToken()
|
|
2586
|
+
body: generatorFunction.body
|
|
2589
2587
|
}))
|
|
2590
2588
|
);
|
|
2591
2589
|
},
|
|
@@ -2637,8 +2635,7 @@ function make2(ts, tsUtils, typeChecker, typeCheckerUtils) {
|
|
|
2637
2635
|
node,
|
|
2638
2636
|
generatorFunction,
|
|
2639
2637
|
effectModule,
|
|
2640
|
-
body: generatorFunction.body
|
|
2641
|
-
functionStar: generatorFunction.getFirstToken()
|
|
2638
|
+
body: generatorFunction.body
|
|
2642
2639
|
}))
|
|
2643
2640
|
);
|
|
2644
2641
|
},
|
|
@@ -4103,6 +4100,7 @@ var missingStarInYieldEffectGen = createDiagnostic({
|
|
|
4103
4100
|
apply: fn("missingStarInYieldEffectGen.apply")(function* (sourceFile, report) {
|
|
4104
4101
|
const ts = yield* service(TypeScriptApi);
|
|
4105
4102
|
const typeParser = yield* service(TypeParser);
|
|
4103
|
+
const tsUtils = yield* service(TypeScriptUtils);
|
|
4106
4104
|
const brokenGenerators = /* @__PURE__ */ new Set();
|
|
4107
4105
|
const brokenYields = /* @__PURE__ */ new Set();
|
|
4108
4106
|
const nodeToVisit = [];
|
|
@@ -4125,9 +4123,9 @@ var missingStarInYieldEffectGen = createDiagnostic({
|
|
|
4125
4123
|
typeParser.effectGen(effectGenNode),
|
|
4126
4124
|
orElse2(() => typeParser.effectFnUntracedGen(effectGenNode)),
|
|
4127
4125
|
orElse2(() => typeParser.effectFnGen(effectGenNode)),
|
|
4128
|
-
map4(({
|
|
4129
|
-
if (
|
|
4130
|
-
brokenGenerators.add(
|
|
4126
|
+
map4(({ generatorFunction }) => {
|
|
4127
|
+
if (generatorFunction) {
|
|
4128
|
+
brokenGenerators.add(ts.getTokenPosOfNode(generatorFunction, tsUtils.getSourceFileOfNode(node)));
|
|
4131
4129
|
}
|
|
4132
4130
|
brokenYields.add(node);
|
|
4133
4131
|
}),
|
|
@@ -4137,8 +4135,8 @@ var missingStarInYieldEffectGen = createDiagnostic({
|
|
|
4137
4135
|
}
|
|
4138
4136
|
}
|
|
4139
4137
|
brokenGenerators.forEach(
|
|
4140
|
-
(
|
|
4141
|
-
location:
|
|
4138
|
+
(pos) => report({
|
|
4139
|
+
location: { pos, end: pos + "function".length },
|
|
4142
4140
|
messageText: `Seems like you used yield instead of yield* inside this Effect.gen.`,
|
|
4143
4141
|
fixes: []
|
|
4144
4142
|
})
|