@effect/language-service 0.21.6 → 0.21.7
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/index.js +7 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +7 -3
- package/transform.js.map +1 -1
package/package.json
CHANGED
package/transform.js
CHANGED
|
@@ -2556,7 +2556,9 @@ var leakingRequirements = createDiagnostic({
|
|
|
2556
2556
|
report({
|
|
2557
2557
|
node,
|
|
2558
2558
|
category: ts.DiagnosticCategory.Warning,
|
|
2559
|
-
messageText: `This Service is leaking the ${requirements.map((_) => typeChecker.typeToString(_)).join(" | ")} requirement
|
|
2559
|
+
messageText: `This Service is leaking the ${requirements.map((_) => typeChecker.typeToString(_)).join(" | ")} requirement.
|
|
2560
|
+
If these requirements cannot be cached and are expected to be provided per method invocation (e.g. HttpServerRequest), you can safely disable this diagnostic for this line through quickfixes.
|
|
2561
|
+
More info at https://effect.website/docs/requirements-management/layers/#avoiding-requirement-leakage`,
|
|
2560
2562
|
fixes: []
|
|
2561
2563
|
});
|
|
2562
2564
|
}
|
|
@@ -2569,7 +2571,7 @@ var leakingRequirements = createDiagnostic({
|
|
|
2569
2571
|
while (nodeToVisit.length > 0) {
|
|
2570
2572
|
const node = nodeToVisit.shift();
|
|
2571
2573
|
const typesToCheck = [];
|
|
2572
|
-
if (ts.isCallExpression(node)) {
|
|
2574
|
+
if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) && ts.isIdentifier(node.expression.name) && node.expression.name.text === "GenericTag") {
|
|
2573
2575
|
typesToCheck.push([typeChecker.getTypeAtLocation(node), node]);
|
|
2574
2576
|
} else if (ts.isClassDeclaration(node) && node.name && node.heritageClauses) {
|
|
2575
2577
|
const classSym = typeChecker.getSymbolAtLocation(node.name);
|
|
@@ -2882,7 +2884,9 @@ var returnEffectInGen = createDiagnostic({
|
|
|
2882
2884
|
report({
|
|
2883
2885
|
node,
|
|
2884
2886
|
category: ts.DiagnosticCategory.Suggestion,
|
|
2885
|
-
messageText: `You are returning an Effect-able type inside a generator function, and will result in nested Effect<Effect<...>>.
|
|
2887
|
+
messageText: `You are returning an Effect-able type inside a generator function, and will result in nested Effect<Effect<...>>.
|
|
2888
|
+
Maybe you wanted to return yield* instead?
|
|
2889
|
+
Nested Effect-able types may be intended if you plan to later manually flatten or unwrap this Effect, if so you can safely disable this diagnostic for this line through quickfixes.`,
|
|
2886
2890
|
fixes: fix
|
|
2887
2891
|
});
|
|
2888
2892
|
}),
|