Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: consistent-type-imports #2144

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default tseslint.config(
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-parameter-properties": "off",
Expand Down
6 changes: 3 additions & 3 deletions factory/formatter.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChainTypeFormatter } from "../src/ChainTypeFormatter.js";
import { CircularReferenceTypeFormatter } from "../src/CircularReferenceTypeFormatter.js";
import { CompletedConfig } from "../src/Config.js";
import { MutableTypeFormatter } from "../src/MutableTypeFormatter.js";
import { TypeFormatter } from "../src/TypeFormatter.js";
import type { CompletedConfig } from "../src/Config.js";
import type { MutableTypeFormatter } from "../src/MutableTypeFormatter.js";
import type { TypeFormatter } from "../src/TypeFormatter.js";
import { AliasTypeFormatter } from "../src/TypeFormatter/AliasTypeFormatter.js";
import { AnnotatedTypeFormatter } from "../src/TypeFormatter/AnnotatedTypeFormatter.js";
import { AnyTypeFormatter } from "../src/TypeFormatter/AnyTypeFormatter.js";
Expand Down
3 changes: 2 additions & 1 deletion factory/generator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Config, DEFAULT_CONFIG } from "../src/Config.js";
import type { Config } from "../src/Config.js";
import { DEFAULT_CONFIG } from "../src/Config.js";
import { SchemaGenerator } from "../src/SchemaGenerator.js";
import { createFormatter } from "./formatter.js";
import { createParser } from "./parser.js";
Expand Down
4 changes: 2 additions & 2 deletions src/AnnotationsReader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ts from "typescript";
import { Annotations } from "./Type/AnnotatedType.js";
import type ts from "typescript";
import type { Annotations } from "./Type/AnnotatedType.js";

export interface AnnotationsReader {
getAnnotations(node: ts.Node): Annotations | undefined;
Expand Down
6 changes: 3 additions & 3 deletions src/AnnotationsReader/BasicAnnotationsReader.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json5 from "json5";
import ts from "typescript";
import { AnnotationsReader } from "../AnnotationsReader.js";
import { Annotations } from "../Type/AnnotatedType.js";
import type ts from "typescript";
import type { AnnotationsReader } from "../AnnotationsReader.js";
import type { Annotations } from "../Type/AnnotatedType.js";
import { symbolAtNode } from "../Utils/symbolAtNode.js";

export class BasicAnnotationsReader implements AnnotationsReader {
Expand Down Expand Up @@ -76,12 +76,12 @@
}

const annotations = jsDocTags.reduce((result: Annotations, jsDocTag) => {
const value = this.parseJsDocTag(jsDocTag);

Check warning on line 79 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe assignment of an `any` value

Check warning on line 79 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe assignment of an `any` value
if (value !== undefined) {
if (BasicAnnotationsReader.requiresDollar.has(jsDocTag.name)) {
result["$" + jsDocTag.name] = value;

Check warning on line 82 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe assignment of an `any` value

Check warning on line 82 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe assignment of an `any` value
} else {
result[jsDocTag.name] = value;

Check warning on line 84 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe assignment of an `any` value

Check warning on line 84 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe assignment of an `any` value
}
}
return result;
Expand All @@ -99,8 +99,8 @@
if (isTextTag) {
return text;
}
let parsed = this.parseJson(text);

Check warning on line 102 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe assignment of an `any` value

Check warning on line 102 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe assignment of an `any` value
parsed = parsed === undefined ? text : parsed;

Check warning on line 103 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe assignment of an `any` value

Check warning on line 103 in src/AnnotationsReader/BasicAnnotationsReader.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe assignment of an `any` value
if (BasicAnnotationsReader.jsonTags.has(jsDocTag.name)) {
return parsed;
} else if (this.extraTags?.has(jsDocTag.name)) {
Expand Down
4 changes: 2 additions & 2 deletions src/AnnotationsReader/ExtendedAnnotationsReader.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json5 from "json5";
import ts from "typescript";
import { Annotations } from "../Type/AnnotatedType.js";
import type ts from "typescript";
import type { Annotations } from "../Type/AnnotatedType.js";
import { symbolAtNode } from "../Utils/symbolAtNode.js";
import { BasicAnnotationsReader } from "./BasicAnnotationsReader.js";

Expand Down
8 changes: 4 additions & 4 deletions src/CircularReferenceNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context } from "./NodeParser.js";
import { SubNodeParser } from "./SubNodeParser.js";
import { BaseType } from "./Type/BaseType.js";
import type ts from "typescript";
import type { Context } from "./NodeParser.js";
import type { SubNodeParser } from "./SubNodeParser.js";
import type { BaseType } from "./Type/BaseType.js";
import { ReferenceType } from "./Type/ReferenceType.js";
import { getKey } from "./Utils/nodeKey.js";

Expand Down
6 changes: 3 additions & 3 deletions src/CircularReferenceTypeFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Definition } from "./Schema/Definition.js";
import { SubTypeFormatter } from "./SubTypeFormatter.js";
import { BaseType } from "./Type/BaseType.js";
import type { Definition } from "./Schema/Definition.js";
import type { SubTypeFormatter } from "./SubTypeFormatter.js";
import type { BaseType } from "./Type/BaseType.js";
import { uniqueArray } from "./Utils/uniqueArray.js";

export class CircularReferenceTypeFormatter implements SubTypeFormatter {
Expand Down
8 changes: 4 additions & 4 deletions src/ExposeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ts from "typescript";
import { Context } from "./NodeParser.js";
import { SubNodeParser } from "./SubNodeParser.js";
import { BaseType } from "./Type/BaseType.js";
import type { Context } from "./NodeParser.js";
import type { SubNodeParser } from "./SubNodeParser.js";
import type { BaseType } from "./Type/BaseType.js";
import { DefinitionType } from "./Type/DefinitionType.js";
import { ReferenceType } from "./Type/ReferenceType.js";
import type { ReferenceType } from "./Type/ReferenceType.js";
import { hasJsDocTag } from "./Utils/hasJsDocTag.js";
import { symbolAtNode } from "./Utils/symbolAtNode.js";

Expand Down Expand Up @@ -38,7 +38,7 @@
return false;
}

const localSymbol: ts.Symbol = (node as any).localSymbol;

Check warning on line 41 in src/ExposeNodeParser.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe assignment of an `any` value

Check warning on line 41 in src/ExposeNodeParser.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe member access .localSymbol on an `any` value

Check warning on line 41 in src/ExposeNodeParser.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe assignment of an `any` value

Check warning on line 41 in src/ExposeNodeParser.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe member access .localSymbol on an `any` value
return localSymbol ? "exportSymbol" in localSymbol : false;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Interfaces/AnnotationsReader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ts from "typescript";
import { Annotations } from "../Type/AnnotatedType.js";
import type ts from "typescript";
import type { Annotations } from "../Type/AnnotatedType.js";

export interface AnnotationsReader {
getAnnotations(node: ts.Node): Annotations | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/MutableParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SubNodeParser } from "./SubNodeParser.js";
import type { SubNodeParser } from "./SubNodeParser.js";

export interface MutableParser {
addNodeParser(parser: SubNodeParser): MutableParser;
Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/MutableTypeFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SubTypeFormatter } from "./SubTypeFormatter.js";
import type { SubTypeFormatter } from "./SubTypeFormatter.js";

export interface MutableTypeFormatter {
addTypeFormatter(formatter: SubTypeFormatter): MutableTypeFormatter;
Expand Down
4 changes: 2 additions & 2 deletions src/Interfaces/SubNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ts from "typescript";
import { NodeParser } from "../NodeParser.js";
import type ts from "typescript";
import type { NodeParser } from "../NodeParser.js";

export interface SubNodeParser extends NodeParser {
supportsNode(node: ts.Node): boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/Interfaces/SubTypeFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseType } from "../Type/BaseType.js";
import { TypeFormatter } from "./TypeFormatter.js";
import type { BaseType } from "../Type/BaseType.js";
import type { TypeFormatter } from "./TypeFormatter.js";

export interface SubTypeFormatter extends TypeFormatter {
supportsType(type: BaseType): boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/Interfaces/TypeFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Definition } from "../Schema/Definition.js";
import { BaseType } from "../Type/BaseType.js";
import type { Definition } from "../Schema/Definition.js";
import type { BaseType } from "../Type/BaseType.js";

export interface TypeFormatter {
getDefinition(type: BaseType): Definition;
Expand Down
2 changes: 1 addition & 1 deletion src/MutableParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SubNodeParser } from "./SubNodeParser.js";
import type { SubNodeParser } from "./SubNodeParser.js";

export interface MutableParser {
addNodeParser(parser: SubNodeParser): MutableParser;
Expand Down
2 changes: 1 addition & 1 deletion src/MutableTypeFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SubTypeFormatter } from "./SubTypeFormatter.js";
import type { SubTypeFormatter } from "./SubTypeFormatter.js";

export interface MutableTypeFormatter {
addTypeFormatter(formatter: SubTypeFormatter): MutableTypeFormatter;
Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import stringify from "safe-stable-stringify";
import ts from "typescript";
import { BaseType } from "./Type/BaseType.js";
import { ReferenceType } from "./Type/ReferenceType.js";
import type ts from "typescript";
import type { BaseType } from "./Type/BaseType.js";
import type { ReferenceType } from "./Type/ReferenceType.js";
import { getKey } from "./Utils/nodeKey.js";

export class Context {
Expand Down
10 changes: 5 additions & 5 deletions src/NodeParser/AnnotatedNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import ts from "typescript";
import { AnnotationsReader } from "../AnnotationsReader.js";
import type { AnnotationsReader } from "../AnnotationsReader.js";
import { ExtendedAnnotationsReader } from "../AnnotationsReader/ExtendedAnnotationsReader.js";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import { AnnotatedType } from "../Type/AnnotatedType.js";
import { BaseType } from "../Type/BaseType.js";
import { ReferenceType } from "../Type/ReferenceType.js";
import type { BaseType } from "../Type/BaseType.js";
import type { ReferenceType } from "../Type/ReferenceType.js";
import { removeUndefined } from "../Utils/removeUndefined.js";
import { DefinitionType } from "../Type/DefinitionType.js";
import { UnionType } from "../Type/UnionType.js";
Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser/AnyTypeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ts from "typescript";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import { AnyType } from "../Type/AnyType.js";
import { BaseType } from "../Type/BaseType.js";
import type { BaseType } from "../Type/BaseType.js";

export class AnyTypeNodeParser implements SubNodeParser {
public supportsNode(node: ts.KeywordTypeNode): boolean {
Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser/ArrayLiteralExpressionNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { Context, NodeParser } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { TupleType } from "../Type/TupleType.js";

export class ArrayLiteralExpressionNodeParser implements SubNodeParser {
Expand Down
8 changes: 4 additions & 4 deletions src/NodeParser/AsExpressionNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NodeParser } from "../NodeParser.js";
import type { NodeParser } from "../NodeParser.js";
import ts from "typescript";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";

export class AsExpressionNodeParser implements SubNodeParser {
public constructor(protected childNodeParser: NodeParser) {}
Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser/BooleanLiteralNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { LiteralType } from "../Type/LiteralType.js";

export class BooleanLiteralNodeParser implements SubNodeParser {
Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser/BooleanTypeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { BooleanType } from "../Type/BooleanType.js";

export class BooleanTypeNodeParser implements SubNodeParser {
Expand Down
7 changes: 4 additions & 3 deletions src/NodeParser/CallExpressionParser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { TupleType } from "../Type/TupleType.js";
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { NodeParser } from "../NodeParser.js";
import { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { UnionType } from "../Type/UnionType.js";
import { LiteralType } from "../Type/LiteralType.js";
import { SymbolType } from "../Type/SymbolType.js";
Expand All @@ -20,9 +21,9 @@
const type = this.typeChecker.getTypeAtLocation(node);

// FIXME: remove special case
if (Array.isArray((type as any)?.typeArguments?.[0]?.types)) {

Check warning on line 24 in src/NodeParser/CallExpressionParser.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe member access .typeArguments on an `any` value

Check warning on line 24 in src/NodeParser/CallExpressionParser.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe member access .typeArguments on an `any` value
return new TupleType([
new UnionType((type as any).typeArguments[0].types.map((t: any) => new LiteralType(t.value))),

Check warning on line 26 in src/NodeParser/CallExpressionParser.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe argument of type `any` assigned to a parameter of type `readonly BaseType[]`

Check warning on line 26 in src/NodeParser/CallExpressionParser.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Unsafe call of a(n) `any` typed value

Check warning on line 26 in src/NodeParser/CallExpressionParser.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe argument of type `any` assigned to a parameter of type `readonly BaseType[]`

Check warning on line 26 in src/NodeParser/CallExpressionParser.ts

View workflow job for this annotation

GitHub Actions / Test (windows-latest)

Unsafe call of a(n) `any` typed value
]);
}

Expand Down
7 changes: 4 additions & 3 deletions src/NodeParser/ConditionalTypeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { NodeParser } from "../NodeParser.js";
import { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { isAssignableTo } from "../Utils/isAssignableTo.js";
import { narrowType } from "../Utils/narrowType.js";
import { UnionType } from "../Type/UnionType.js";
Expand Down
8 changes: 4 additions & 4 deletions src/NodeParser/ConstructorNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import ts from "typescript";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { ConstructorType } from "../Type/ConstructorType.js";
import { FunctionOptions } from "../Config.js";
import type { FunctionOptions } from "../Config.js";
import { NeverType } from "../Type/NeverType.js";
import { Context, NodeParser } from "../NodeParser.js";
import type { Context, NodeParser } from "../NodeParser.js";
import { DefinitionType } from "../Type/DefinitionType.js";
import { getNamedArguments, getTypeName } from "./FunctionNodeParser.js";

Expand Down
9 changes: 5 additions & 4 deletions src/NodeParser/EnumNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import ts from "typescript";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import { EnumType, EnumValue } from "../Type/EnumType.js";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import type { EnumValue } from "../Type/EnumType.js";
import { EnumType } from "../Type/EnumType.js";
import { isNodeHidden } from "../Utils/isHidden.js";
import { getKey } from "../Utils/nodeKey.js";

Expand Down
7 changes: 4 additions & 3 deletions src/NodeParser/ExpressionWithTypeArgumentsNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { NodeParser } from "../NodeParser.js";
import { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";

export class ExpressionWithTypeArgumentsNodeParser implements SubNodeParser {
public constructor(
Expand Down
8 changes: 4 additions & 4 deletions src/NodeParser/HiddenTypeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type ts from "typescript";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { HiddenType } from "../Type/HiddenType.js";
import { isNodeHidden } from "../Utils/isHidden.js";

Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser/InferTypeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { Context, NodeParser } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { InferType } from "../Type/InferType.js";

export class InferTypeNodeParser implements SubNodeParser {
Expand Down
11 changes: 6 additions & 5 deletions src/NodeParser/InterfaceAndClassNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import ts, { PropertyName } from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import type { PropertyName } from "typescript";
import ts from "typescript";
import type { Context, NodeParser } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import { ArrayType } from "../Type/ArrayType.js";
import { BaseType } from "../Type/BaseType.js";
import type { BaseType } from "../Type/BaseType.js";
import { NeverType } from "../Type/NeverType.js";
import { ObjectProperty, ObjectType } from "../Type/ObjectType.js";
import { ReferenceType } from "../Type/ReferenceType.js";
import type { ReferenceType } from "../Type/ReferenceType.js";
import { isNodeHidden } from "../Utils/isHidden.js";
import { isPublic, isStatic } from "../Utils/modifiers.js";
import { getKey } from "../Utils/nodeKey.js";
Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser/LiteralNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { Context, NodeParser } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";

export class LiteralNodeParser implements SubNodeParser {
public constructor(protected childNodeParser: NodeParser) {}
Expand Down
10 changes: 6 additions & 4 deletions src/NodeParser/MappedTypeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import ts from "typescript";
import { ExpectationFailedError } from "../Error/Errors.js";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import type { NodeParser } from "../NodeParser.js";
import { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import { AnnotatedType } from "../Type/AnnotatedType.js";
import { ArrayType } from "../Type/ArrayType.js";
import { BaseType } from "../Type/BaseType.js";
import type { BaseType } from "../Type/BaseType.js";
import { DefinitionType } from "../Type/DefinitionType.js";
import { EnumType, EnumValue } from "../Type/EnumType.js";
import type { EnumValue } from "../Type/EnumType.js";
import { EnumType } from "../Type/EnumType.js";
import { LiteralType } from "../Type/LiteralType.js";
import { NeverType } from "../Type/NeverType.js";
import { NumberType } from "../Type/NumberType.js";
Expand Down
8 changes: 4 additions & 4 deletions src/NodeParser/NamedTupleMemberNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import ts from "typescript";
import { Context, NodeParser } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import type { Context, NodeParser } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import { AnnotatedType } from "../Type/AnnotatedType.js";
import { ArrayType } from "../Type/ArrayType.js";
import { BaseType } from "../Type/BaseType.js";
import { ReferenceType } from "../Type/ReferenceType.js";
import type { BaseType } from "../Type/BaseType.js";
import type { ReferenceType } from "../Type/ReferenceType.js";
import { RestType } from "../Type/RestType.js";

export class NamedTupleMemberNodeParser implements SubNodeParser {
Expand Down
6 changes: 3 additions & 3 deletions src/NodeParser/NeverTypeNodeParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import { Context } from "../NodeParser.js";
import { SubNodeParser } from "../SubNodeParser.js";
import { BaseType } from "../Type/BaseType.js";
import type { Context } from "../NodeParser.js";
import type { SubNodeParser } from "../SubNodeParser.js";
import type { BaseType } from "../Type/BaseType.js";
import { NeverType } from "../Type/NeverType.js";

export class NeverTypeNodeParser implements SubNodeParser {
Expand Down
Loading
Loading