@effect/language-service 0.35.0 → 0.35.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/cli.js CHANGED
@@ -29008,7 +29008,7 @@ function makeTypeScriptUtils(ts2) {
29008
29008
  );
29009
29009
  if (fnName) {
29010
29010
  fnCall = ts2.factory.createCallExpression(
29011
- fnName,
29011
+ fnCall,
29012
29012
  void 0,
29013
29013
  [ts2.factory.createStringLiteral(fnName.text)]
29014
29014
  );
@@ -29256,6 +29256,38 @@ function makeTypeScriptUtils(ts2) {
29256
29256
  )
29257
29257
  );
29258
29258
  }
29259
+ function createDataTaggedErrorDeclaration(dataModuleIdentifier, name, fields) {
29260
+ const invokeTaggedError = ts2.factory.createCallExpression(
29261
+ ts2.factory.createPropertyAccessExpression(
29262
+ ts2.factory.createIdentifier(dataModuleIdentifier),
29263
+ "TaggedError"
29264
+ ),
29265
+ void 0,
29266
+ [
29267
+ ts2.factory.createStringLiteral(name)
29268
+ ]
29269
+ );
29270
+ const withTypeFields = ts2.factory.createExpressionWithTypeArguments(
29271
+ invokeTaggedError,
29272
+ [
29273
+ ts2.factory.createTypeLiteralNode(fields)
29274
+ ]
29275
+ );
29276
+ return ts2.factory.createClassDeclaration(
29277
+ [ts2.factory.createModifier(ts2.SyntaxKind.ExportKeyword)],
29278
+ name,
29279
+ void 0,
29280
+ [
29281
+ ts2.factory.createHeritageClause(
29282
+ ts2.SyntaxKind.ExtendsKeyword,
29283
+ [
29284
+ withTypeFields
29285
+ ]
29286
+ )
29287
+ ],
29288
+ []
29289
+ );
29290
+ }
29259
29291
  return {
29260
29292
  findNodeAtPositionIncludingTrivia,
29261
29293
  parsePackageContentNameAndVersionFromScope,
@@ -29267,6 +29299,7 @@ function makeTypeScriptUtils(ts2) {
29267
29299
  isNodeInRange,
29268
29300
  transformAsyncAwaitToEffectFn,
29269
29301
  transformAsyncAwaitToEffectGen,
29302
+ createDataTaggedErrorDeclaration,
29270
29303
  findImportedModuleIdentifierByPackageAndNameOrBarrel,
29271
29304
  simplifyTypeNode,
29272
29305
  tryPreserveDeclarationSemantics,