From ca9fbec7f1e4a0d4fcd7be246f88d4fa9a60fbaf Mon Sep 17 00:00:00 2001 From: Jairus Date: Thu, 25 Jul 2024 13:20:24 -0400 Subject: [PATCH] format --- transform/lib/index.js | 1 - transform/src/index.ts | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/transform/lib/index.js b/transform/lib/index.js index 2336eca..12cc84d 100644 --- a/transform/lib/index.js +++ b/transform/lib/index.js @@ -100,7 +100,6 @@ class JSONTransform extends BaseVisitor { throw new Error("Expected 1 argument but got zero at @alias in " + node.range.source.normalizedPath); mem.alias = args[0]; - console.log("alias: " + mem.alias); mem.flags.set(PropertyFlags.Alias, args); break; } diff --git a/transform/src/index.ts b/transform/src/index.ts index 91bfa4e..b3d3e80 100644 --- a/transform/src/index.ts +++ b/transform/src/index.ts @@ -24,7 +24,7 @@ class JSONTransform extends BaseVisitor { public currentClass!: SchemaData; public sources = new Set(); - visitMethodDeclaration(): void { } + visitMethodDeclaration(): void {} visitClassDeclaration(node: ClassDeclaration): void { if (!node.decorators?.length) return; @@ -109,9 +109,9 @@ class JSONTransform extends BaseVisitor { if (!member.type) { throw new Error( "Fields must be strongly typed! Found " + - toString(member) + - " at " + - node.range.source.normalizedPath, + toString(member) + + " at " + + node.range.source.normalizedPath, ); } const type = toString(member.type!); @@ -143,9 +143,9 @@ class JSONTransform extends BaseVisitor { if (!args.length) throw new Error( "Expected 1 argument but got zero at @alias in " + - node.range.source.normalizedPath, + node.range.source.normalizedPath, ); - mem.alias = args[0]! + mem.alias = args[0]!; mem.flags.set(PropertyFlags.Alias, args); break; } @@ -157,7 +157,7 @@ class JSONTransform extends BaseVisitor { if (!decorator.args?.length) throw new Error( "Expected 1 argument but got zero at @omitif in " + - node.range.source.normalizedPath, + node.range.source.normalizedPath, ); mem.flags.set(PropertyFlags.OmitIf, args); break;