@effect/language-service 0.58.1 → 0.58.2
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/cli.js +6 -3
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +6 -3
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +6 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +6 -3
- package/transform.js.map +1 -1
package/package.json
CHANGED
package/transform.js
CHANGED
|
@@ -3681,9 +3681,11 @@ var anyUnknownInErrorContext = createDiagnostic({
|
|
|
3681
3681
|
}
|
|
3682
3682
|
if (ts.isParameter(node) || ts.isPropertyDeclaration(node) || ts.isVariableDeclaration(node)) {
|
|
3683
3683
|
if (node.type) {
|
|
3684
|
+
const typeNode = node.type;
|
|
3684
3685
|
const type2 = typeChecker.getTypeAtLocation(node.type);
|
|
3685
3686
|
const expectedEffect = yield* pipe(
|
|
3686
3687
|
typeParser.strictEffectType(type2, node.type),
|
|
3688
|
+
orElse2(() => typeParser.layerType(type2, typeNode)),
|
|
3687
3689
|
orElse2(() => void_)
|
|
3688
3690
|
);
|
|
3689
3691
|
if (expectedEffect) continue;
|
|
@@ -3705,8 +3707,9 @@ var anyUnknownInErrorContext = createDiagnostic({
|
|
|
3705
3707
|
if (!type) continue;
|
|
3706
3708
|
yield* pipe(
|
|
3707
3709
|
typeParser.strictEffectType(type, node),
|
|
3708
|
-
map4((
|
|
3709
|
-
|
|
3710
|
+
orElse2(() => pipe(typeParser.layerType(type, node), map4(({ E, RIn }) => ({ E, R: RIn })))),
|
|
3711
|
+
map4((effectOrLayer) => {
|
|
3712
|
+
const { E, R } = effectOrLayer;
|
|
3710
3713
|
const hasAnyUnknownR = isAnyOrUnknown(R);
|
|
3711
3714
|
const hasAnyUnknownE = isAnyOrUnknown(E);
|
|
3712
3715
|
if (hasAnyUnknownR || hasAnyUnknownE) {
|
|
@@ -3729,7 +3732,7 @@ var anyUnknownInErrorContext = createDiagnostic({
|
|
|
3729
3732
|
matchingNodes.splice(i, 1);
|
|
3730
3733
|
}
|
|
3731
3734
|
}
|
|
3732
|
-
const suggestions = [`This
|
|
3735
|
+
const suggestions = [`This has ${channels.join(" and ")} which is not recommended.`];
|
|
3733
3736
|
if (hasAnyUnknownR) {
|
|
3734
3737
|
suggestions.push(`Only service identifiers should appear in the requirements channel.`);
|
|
3735
3738
|
}
|