@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 CHANGED
@@ -3051,7 +3051,9 @@ var leakingRequirements = createDiagnostic({
3051
3051
  report({
3052
3052
  node,
3053
3053
  category: ts.DiagnosticCategory.Warning,
3054
- messageText: `This Service is leaking the ${requirements.map((_) => typeChecker.typeToString(_)).join(" | ")} requirement`,
3054
+ messageText: `This Service is leaking the ${requirements.map((_) => typeChecker.typeToString(_)).join(" | ")} requirement.
3055
+ 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.
3056
+ More info at https://effect.website/docs/requirements-management/layers/#avoiding-requirement-leakage`,
3055
3057
  fixes: []
3056
3058
  });
3057
3059
  }
@@ -3064,7 +3066,7 @@ var leakingRequirements = createDiagnostic({
3064
3066
  while (nodeToVisit.length > 0) {
3065
3067
  const node = nodeToVisit.shift();
3066
3068
  const typesToCheck = [];
3067
- if (ts.isCallExpression(node)) {
3069
+ if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) && ts.isIdentifier(node.expression.name) && node.expression.name.text === "GenericTag") {
3068
3070
  typesToCheck.push([typeChecker.getTypeAtLocation(node), node]);
3069
3071
  } else if (ts.isClassDeclaration(node) && node.name && node.heritageClauses) {
3070
3072
  const classSym = typeChecker.getSymbolAtLocation(node.name);
@@ -3377,7 +3379,9 @@ var returnEffectInGen = createDiagnostic({
3377
3379
  report({
3378
3380
  node,
3379
3381
  category: ts.DiagnosticCategory.Suggestion,
3380
- messageText: `You are returning an Effect-able type inside a generator function, and will result in nested Effect<Effect<...>>. Maybe you wanted to return yield* instead? Nested Effect-able types may be intended if you plan to later manually flatten or unwrap this Effect.`,
3382
+ messageText: `You are returning an Effect-able type inside a generator function, and will result in nested Effect<Effect<...>>.
3383
+ Maybe you wanted to return yield* instead?
3384
+ 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.`,
3381
3385
  fixes: fix
3382
3386
  });
3383
3387
  }),