Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
JairusSW committed Jul 25, 2024
1 parent 1dbc7dc commit ca9fbec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion transform/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
14 changes: 7 additions & 7 deletions transform/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class JSONTransform extends BaseVisitor {
public currentClass!: SchemaData;
public sources = new Set<Source>();

visitMethodDeclaration(): void { }
visitMethodDeclaration(): void {}
visitClassDeclaration(node: ClassDeclaration): void {
if (!node.decorators?.length) return;

Expand Down Expand Up @@ -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!);
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down

0 comments on commit ca9fbec

Please sign in to comment.