@effect/language-service 0.53.3 → 0.55.0

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.
@@ -26,7 +26,7 @@ __export(effect_lsp_patch_utils_exports, {
26
26
  });
27
27
  module.exports = __toCommonJS(effect_lsp_patch_utils_exports);
28
28
 
29
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Function.js
29
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Function.js
30
30
  var isFunction = (input) => typeof input === "function";
31
31
  var dual = function(arity, body) {
32
32
  if (typeof arity === "function") {
@@ -120,7 +120,7 @@ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
120
120
  }
121
121
  }
122
122
 
123
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/GlobalValue.js
123
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/GlobalValue.js
124
124
  var globalStoreId = `effect/GlobalValue`;
125
125
  var globalStore;
126
126
  var globalValue = (id, compute) => {
@@ -134,7 +134,7 @@ var globalValue = (id, compute) => {
134
134
  return globalStore.get(id);
135
135
  };
136
136
 
137
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Predicate.js
137
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Predicate.js
138
138
  var isString = (input) => typeof input === "string";
139
139
  var isNumber = (input) => typeof input === "number";
140
140
  var isBoolean = (input) => typeof input === "boolean";
@@ -144,7 +144,7 @@ var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
144
144
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
145
145
  var isRecord = (input) => isRecordOrArray(input) && !Array.isArray(input);
146
146
 
147
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Utils.js
147
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Utils.js
148
148
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
149
149
  var GenKindImpl = class {
150
150
  value;
@@ -266,7 +266,7 @@ var internalCall = isNotOptimizedAway ? standard.effect_internal_function : forc
266
266
  var genConstructor = function* () {
267
267
  }.constructor;
268
268
 
269
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Hash.js
269
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Hash.js
270
270
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
271
271
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
272
272
  var hash = (self) => {
@@ -365,7 +365,7 @@ var cached = function() {
365
365
  return hash2;
366
366
  };
367
367
 
368
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Equal.js
368
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Equal.js
369
369
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
370
370
  function equals() {
371
371
  if (arguments.length === 1) {
@@ -419,7 +419,7 @@ function compareBoth(self, that) {
419
419
  var isEqual = (u) => hasProperty(u, symbol2);
420
420
  var equivalence = () => equals;
421
421
 
422
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Inspectable.js
422
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Inspectable.js
423
423
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
424
424
  var toJSON = (x) => {
425
425
  try {
@@ -471,7 +471,7 @@ var redact = (u) => {
471
471
  return u;
472
472
  };
473
473
 
474
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Pipeable.js
474
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Pipeable.js
475
475
  var pipeArguments = (self, args2) => {
476
476
  switch (args2.length) {
477
477
  case 0:
@@ -504,14 +504,14 @@ var pipeArguments = (self, args2) => {
504
504
  }
505
505
  };
506
506
 
507
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/internal/opCodes/effect.js
507
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/opCodes/effect.js
508
508
  var OP_COMMIT = "Commit";
509
509
 
510
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/internal/version.js
511
- var moduleVersion = "3.18.4";
510
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/version.js
511
+ var moduleVersion = "3.19.0";
512
512
  var getCurrentVersion = () => moduleVersion;
513
513
 
514
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/internal/effectable.js
514
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/effectable.js
515
515
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
516
516
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
517
517
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
@@ -598,7 +598,7 @@ var StructuralCommitPrototype = {
598
598
  ...StructuralPrototype
599
599
  };
600
600
 
601
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/internal/option.js
601
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/option.js
602
602
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
603
603
  var CommonProto = {
604
604
  ...EffectPrototype,
@@ -656,7 +656,7 @@ var some = (value) => {
656
656
  return a;
657
657
  };
658
658
 
659
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/internal/either.js
659
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/either.js
660
660
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
661
661
  var CommonProto2 = {
662
662
  ...EffectPrototype,
@@ -718,7 +718,7 @@ var right = (right3) => {
718
718
  return a;
719
719
  };
720
720
 
721
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Either.js
721
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Either.js
722
722
  var right2 = right;
723
723
  var left2 = left;
724
724
  var isLeft2 = isLeft;
@@ -726,14 +726,14 @@ var isRight2 = isRight;
726
726
  var map = /* @__PURE__ */ dual(2, (self, f) => isRight2(self) ? right2(f(self.right)) : left2(self.left));
727
727
  var getOrElse = /* @__PURE__ */ dual(2, (self, onLeft) => isLeft2(self) ? onLeft(self.left) : self.right);
728
728
 
729
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/internal/array.js
729
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/internal/array.js
730
730
  var isNonEmptyArray = (self) => self.length > 0;
731
731
 
732
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Order.js
732
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Order.js
733
733
  var make = (compare) => (self, that) => self === that ? 0 : compare(self, that);
734
734
  var string2 = /* @__PURE__ */ make((self, that) => self < that ? -1 : 1);
735
735
 
736
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Option.js
736
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Option.js
737
737
  var none2 = () => none;
738
738
  var some2 = some;
739
739
  var isNone2 = isNone;
@@ -741,7 +741,7 @@ var isSome2 = isSome;
741
741
  var orElse = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? that() : self);
742
742
  var fromNullable = (nullableValue) => nullableValue == null ? none2() : some2(nullableValue);
743
743
 
744
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Record.js
744
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Record.js
745
745
  var map2 = /* @__PURE__ */ dual(2, (self, f) => {
746
746
  const out = {
747
747
  ...self
@@ -753,7 +753,7 @@ var map2 = /* @__PURE__ */ dual(2, (self, f) => {
753
753
  });
754
754
  var keys = (self) => Object.keys(self);
755
755
 
756
- // node_modules/.pnpm/@pkg.pr.new+Effect-TS+effect@97ff1dc_6ntygjheib5kdugabxjhox4fte/node_modules/effect/dist/esm/Array.js
756
+ // node_modules/.pnpm/effect@3.19.0/node_modules/effect/dist/esm/Array.js
757
757
  var fromIterable = (collection) => Array.isArray(collection) ? collection : Array.from(collection);
758
758
  var append = /* @__PURE__ */ dual(2, (self, last) => [...self, last]);
759
759
  var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
@@ -3537,6 +3537,7 @@ function make2(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
3537
3537
  );
3538
3538
  return {
3539
3539
  isNodeReferenceToEffectModuleApi,
3540
+ isNodeReferenceToEffectSchemaModuleApi,
3540
3541
  effectType,
3541
3542
  strictEffectType,
3542
3543
  layerType,
@@ -5582,6 +5583,140 @@ Nested Effect-able types may be intended if you plan to later manually flatten o
5582
5583
  })
5583
5584
  });
5584
5585
 
5586
+ // src/diagnostics/runEffectInsideEffect.ts
5587
+ var runEffectInsideEffect = createDiagnostic({
5588
+ name: "runEffectInsideEffect",
5589
+ code: 32,
5590
+ severity: "suggestion",
5591
+ apply: fn("runEffectInsideEffect.apply")(function* (sourceFile, report) {
5592
+ const ts = yield* service(TypeScriptApi);
5593
+ const typeParser = yield* service(TypeParser);
5594
+ const nodeToVisit = [];
5595
+ const appendNodeToVisit = (node) => {
5596
+ nodeToVisit.push(node);
5597
+ return void 0;
5598
+ };
5599
+ ts.forEachChild(sourceFile, appendNodeToVisit);
5600
+ while (nodeToVisit.length > 0) {
5601
+ const node = nodeToVisit.shift();
5602
+ ts.forEachChild(node, appendNodeToVisit);
5603
+ if (!ts.isCallExpression(node)) continue;
5604
+ const isEffectRunCall = yield* pipe(
5605
+ typeParser.isNodeReferenceToEffectModuleApi("runPromise")(node.expression),
5606
+ orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("runSync")(node.expression)),
5607
+ orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("runFork")(node.expression)),
5608
+ orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("runCallback")(node.expression)),
5609
+ option
5610
+ );
5611
+ if (isNone2(isEffectRunCall)) continue;
5612
+ let currentParent = node.parent;
5613
+ let nodeIntroduceScope = void 0;
5614
+ while (currentParent) {
5615
+ const possiblyEffectGen = currentParent;
5616
+ if (!nodeIntroduceScope) {
5617
+ if (ts.isFunctionExpression(possiblyEffectGen) || ts.isFunctionDeclaration(possiblyEffectGen) || ts.isMethodDeclaration(possiblyEffectGen) || ts.isArrowFunction(possiblyEffectGen)) {
5618
+ nodeIntroduceScope = possiblyEffectGen;
5619
+ continue;
5620
+ }
5621
+ }
5622
+ const isInEffectGen = yield* pipe(
5623
+ typeParser.effectGen(possiblyEffectGen),
5624
+ orElse2(() => typeParser.effectFnUntracedGen(possiblyEffectGen)),
5625
+ orElse2(() => typeParser.effectFnGen(possiblyEffectGen)),
5626
+ option
5627
+ );
5628
+ if (isSome2(isInEffectGen)) {
5629
+ const nodeText = sourceFile.text.substring(
5630
+ ts.getTokenPosOfNode(node.expression, sourceFile),
5631
+ node.expression.end
5632
+ );
5633
+ const messageText = nodeIntroduceScope && nodeIntroduceScope !== isInEffectGen.value.generatorFunction ? `Using ${nodeText} inside an Effect is not recommended. The same runtime should generally be used instead to run child effects.
5634
+ Consider extracting the Runtime by using for example Effect.runtime and then use Runtime.run* with the extracted runtime instead.` : `Using ${nodeText} inside an Effect is not recommended. Effects inside generators can usually just be yielded.`;
5635
+ report({
5636
+ location: node.expression,
5637
+ messageText,
5638
+ fixes: []
5639
+ });
5640
+ }
5641
+ currentParent = currentParent.parent;
5642
+ }
5643
+ }
5644
+ })
5645
+ });
5646
+
5647
+ // src/diagnostics/schemaUnionOfLiterals.ts
5648
+ var schemaUnionOfLiterals = createDiagnostic({
5649
+ name: "schemaUnionOfLiterals",
5650
+ code: 33,
5651
+ severity: "off",
5652
+ apply: fn("schemaUnionOfLiterals.apply")(function* (sourceFile, report) {
5653
+ const ts = yield* service(TypeScriptApi);
5654
+ const typeParser = yield* service(TypeParser);
5655
+ const nodeToVisit = [];
5656
+ const appendNodeToVisit = (node) => {
5657
+ nodeToVisit.push(node);
5658
+ return void 0;
5659
+ };
5660
+ ts.forEachChild(sourceFile, appendNodeToVisit);
5661
+ while (nodeToVisit.length > 0) {
5662
+ const node = nodeToVisit.shift();
5663
+ if (ts.isCallExpression(node)) {
5664
+ const isSchemaUnionCall = yield* pipe(
5665
+ typeParser.isNodeReferenceToEffectSchemaModuleApi("Union")(node.expression),
5666
+ orElse2(() => void_)
5667
+ );
5668
+ if (isSchemaUnionCall) {
5669
+ const args2 = fromIterable(node.arguments);
5670
+ if (args2.length >= 2) {
5671
+ const allAreCallExpressions = args2.every((arg) => ts.isCallExpression(arg));
5672
+ if (allAreCallExpressions) {
5673
+ const literalChecks = args2.map((arg) => {
5674
+ const callArg = arg;
5675
+ return pipe(
5676
+ typeParser.isNodeReferenceToEffectSchemaModuleApi("Literal")(callArg.expression),
5677
+ map4(() => callArg)
5678
+ );
5679
+ });
5680
+ const allLiteralsResult = yield* pipe(
5681
+ all(...literalChecks),
5682
+ option
5683
+ );
5684
+ if (allLiteralsResult._tag === "Some") {
5685
+ const allLiteralValues = [];
5686
+ for (const literalCall of allLiteralsResult.value) {
5687
+ for (const arg of literalCall.arguments) {
5688
+ allLiteralValues.push(arg);
5689
+ }
5690
+ }
5691
+ const firstLiteralCall = allLiteralsResult.value[0];
5692
+ const schemaLiteralExpression = firstLiteralCall.expression;
5693
+ report({
5694
+ location: node,
5695
+ messageText: "A Schema.Union of multiple Schema.Literal calls can be simplified to a single Schema.Literal call.",
5696
+ fixes: [{
5697
+ fixName: "schemaUnionOfLiterals_fix",
5698
+ description: "Replace with a single Schema.Literal call",
5699
+ apply: gen(function* () {
5700
+ const changeTracker = yield* service(ChangeTracker);
5701
+ const newNode = ts.factory.createCallExpression(
5702
+ schemaLiteralExpression,
5703
+ void 0,
5704
+ allLiteralValues
5705
+ );
5706
+ changeTracker.replaceNode(sourceFile, node, newNode);
5707
+ })
5708
+ }]
5709
+ });
5710
+ }
5711
+ }
5712
+ }
5713
+ }
5714
+ }
5715
+ ts.forEachChild(node, appendNodeToVisit);
5716
+ }
5717
+ })
5718
+ });
5719
+
5585
5720
  // src/diagnostics/scopeInLayerEffect.ts
5586
5721
  var scopeInLayerEffect = createDiagnostic({
5587
5722
  name: "scopeInLayerEffect",
@@ -5830,6 +5965,63 @@ var tryCatchInEffectGen = createDiagnostic({
5830
5965
  })
5831
5966
  });
5832
5967
 
5968
+ // src/diagnostics/unknownInEffectCatch.ts
5969
+ var unknownInEffectCatch = createDiagnostic({
5970
+ name: "unknownInEffectCatch",
5971
+ code: 31,
5972
+ severity: "warning",
5973
+ apply: fn("unknownInEffectCatch.apply")(function* (sourceFile, report) {
5974
+ const ts = yield* service(TypeScriptApi);
5975
+ const typeParser = yield* service(TypeParser);
5976
+ const typeChecker = yield* service(TypeCheckerApi);
5977
+ const nodeToVisit = [];
5978
+ const appendNodeToVisit = (node) => {
5979
+ nodeToVisit.push(node);
5980
+ return void 0;
5981
+ };
5982
+ ts.forEachChild(sourceFile, appendNodeToVisit);
5983
+ while (nodeToVisit.length > 0) {
5984
+ const node = nodeToVisit.shift();
5985
+ ts.forEachChild(node, appendNodeToVisit);
5986
+ if (ts.isCallExpression(node)) {
5987
+ const isEffectWithCatch = yield* pipe(
5988
+ typeParser.isNodeReferenceToEffectModuleApi("tryPromise")(node.expression),
5989
+ orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("try")(node.expression)),
5990
+ orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("tryMap")(node.expression)),
5991
+ orElse2(() => typeParser.isNodeReferenceToEffectModuleApi("tryMapPromise")(node.expression)),
5992
+ orElse2(() => void_)
5993
+ );
5994
+ if (isEffectWithCatch) {
5995
+ const signature = typeChecker.getResolvedSignature(node);
5996
+ if (signature) {
5997
+ const objectType = typeChecker.getParameterType(signature, 0);
5998
+ const catchFunctionSymbol = typeChecker.getPropertyOfType(objectType, "catch");
5999
+ if (catchFunctionSymbol) {
6000
+ const catchFunctionType = typeChecker.getTypeOfSymbolAtLocation(catchFunctionSymbol, node);
6001
+ const signatures = typeChecker.getSignaturesOfType(catchFunctionType, ts.SignatureKind.Call);
6002
+ if (signatures.length > 0) {
6003
+ const returnType = typeChecker.getReturnTypeOfSignature(signatures[0]);
6004
+ if (returnType && (returnType.flags & ts.TypeFlags.Unknown || returnType.flags & ts.TypeFlags.Any)) {
6005
+ const nodeText = sourceFile.text.substring(
6006
+ ts.getTokenPosOfNode(node.expression, sourceFile),
6007
+ node.expression.end
6008
+ );
6009
+ report({
6010
+ location: node.expression,
6011
+ messageText: `The 'catch' callback in ${nodeText} returns 'unknown'. The catch callback should be used to provide typed errors.
6012
+ Consider wrapping unknown errors into Effect's Data.TaggedError for example, or narrow down the type to the specific error raised.`,
6013
+ fixes: []
6014
+ });
6015
+ }
6016
+ }
6017
+ }
6018
+ }
6019
+ }
6020
+ }
6021
+ }
6022
+ })
6023
+ });
6024
+
5833
6025
  // src/diagnostics/unnecessaryEffectGen.ts
5834
6026
  var unnecessaryEffectGen = createDiagnostic({
5835
6027
  name: "unnecessaryEffectGen",
@@ -6077,7 +6269,10 @@ var diagnostics = [
6077
6269
  nonObjectEffectServiceType,
6078
6270
  deterministicKeys,
6079
6271
  missedPipeableOpportunity,
6080
- strictEffectProvide
6272
+ strictEffectProvide,
6273
+ unknownInEffectCatch,
6274
+ runEffectInsideEffect,
6275
+ schemaUnionOfLiterals
6081
6276
  ];
6082
6277
 
6083
6278
  // src/effect-lsp-patch-utils.ts
@@ -6101,7 +6296,7 @@ function appendMetadataRelationError(tsInstance, errorNode, source, target) {
6101
6296
  ]);
6102
6297
  }
6103
6298
  }
6104
- function checkSourceFileWorker(tsInstance, program, sourceFile, compilerOptions, addDiagnostic) {
6299
+ function checkSourceFileWorker(tsInstance, program, sourceFile, compilerOptions, addDiagnostic, moduleName) {
6105
6300
  const pluginOptions = extractEffectLspOptions(compilerOptions);
6106
6301
  if (!pluginOptions) return;
6107
6302
  const parsedOptions = {
@@ -6124,12 +6319,12 @@ function checkSourceFileWorker(tsInstance, program, sourceFile, compilerOptions,
6124
6319
  map((_) => _.diagnostics),
6125
6320
  map(
6126
6321
  filter(
6127
- (_) => _.category === tsInstance.DiagnosticCategory.Error || _.category === tsInstance.DiagnosticCategory.Warning || parsedOptions.reportSuggestionsAsWarningsInTsc && (_.category === tsInstance.DiagnosticCategory.Suggestion || _.category === tsInstance.DiagnosticCategory.Message)
6322
+ (_) => _.category === tsInstance.DiagnosticCategory.Error || _.category === tsInstance.DiagnosticCategory.Warning || moduleName === "tsc" && parsedOptions.reportSuggestionsAsWarningsInTsc && (_.category === tsInstance.DiagnosticCategory.Suggestion || _.category === tsInstance.DiagnosticCategory.Message)
6128
6323
  )
6129
6324
  ),
6130
6325
  map(
6131
6326
  map3((_) => {
6132
- if (parsedOptions.reportSuggestionsAsWarningsInTsc && _.category === tsInstance.DiagnosticCategory.Suggestion) {
6327
+ if (moduleName === "tsc" && parsedOptions.reportSuggestionsAsWarningsInTsc && _.category === tsInstance.DiagnosticCategory.Suggestion) {
6133
6328
  return { ..._, category: tsInstance.DiagnosticCategory.Message };
6134
6329
  }
6135
6330
  return _;