Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed May 23, 2024
1 parent 62da85f commit a3c7119
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
2 changes: 0 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,3 @@ export * from "./factory/index.js";

import ts from "typescript";
export { ts };

let a: string = 1;
20 changes: 10 additions & 10 deletions src/NodeParser/IntersectionNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import { ExpectationFailedTJSGError } from "../Error/Errors.js";
import type { Context, NodeParser } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { IntersectionType } from "../Type/IntersectionType.js";
import { PrimitiveType } from "../Type/PrimitiveType.js";
import { UnionType } from "../Type/UnionType.js";
import { derefType } from "../Utils/derefType.js";
import { uniqueTypeArray } from "../Utils/uniqueTypeArray.js";
import { UndefinedType } from "../Type/UndefinedType.js";
import { LiteralType } from "../Type/LiteralType.js";
import { NeverType } from "../Type/NeverType.js";
import { ObjectType } from "../Type/ObjectType.js";
import { PrimitiveType } from "../Type/PrimitiveType.js";
import { StringType } from "../Type/StringType.js";
import { LiteralType } from "../Type/LiteralType.js";
import { UndefinedType } from "../Type/UndefinedType.js";
import { UnionType } from "../Type/UnionType.js";
import { isLiteralUnion } from "../TypeFormatter/LiteralUnionTypeFormatter.js";
import { ExpectationFailedTJSGError, LogicTJSGError } from "../Error/Errors.js";
import { derefType } from "../Utils/derefType.js";
import { uniqueTypeArray } from "../Utils/uniqueTypeArray.js";

export class IntersectionNodeParser implements SubNodeParser {
public constructor(
Expand Down
8 changes: 4 additions & 4 deletions src/NodeParser/PrefixUnaryExpressionNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import { ExpectationFailedTJSGError } from "../Error/Errors.js";
import type { Context, NodeParser } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { LiteralType } from "../Type/LiteralType.js";
import { ExpectationFailedTJSGError, LogicTJSGError } from "../Error/Errors.js";

export class PrefixUnaryExpressionNodeParser implements SubNodeParser {
public constructor(protected childNodeParser: NodeParser) {}
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/extractLiterals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ function* _extractLiterals(type: BaseType): Iterable<string> {

if (dereffedType instanceof UnionType || dereffedType instanceof EnumType) {
for (const t of dereffedType.getTypes()) {
yield * _extractLiterals(t);
yield* _extractLiterals(t);
}

return;
}

if (dereffedType instanceof AliasType || dereffedType instanceof DefinitionType) {
yield * _extractLiterals(dereffedType.getType());
yield* _extractLiterals(dereffedType.getType());
return;
}

Expand Down

0 comments on commit a3c7119

Please sign in to comment.