Skip to content

Commit

Permalink
Break circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Jun 9, 2024
1 parent 1482eb5 commit f1c071c
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/lib/utils/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import { ReflectionKind } from "../models/reflections/kind";
import type { DeclarationReflection } from "../models/reflections/declaration";
import { LiteralType } from "../models/types";
import type { Options } from "./options";
import type { DocumentReflection } from "../models";

Expand Down Expand Up @@ -111,13 +110,9 @@ const sorts: Record<
const bRefl = b as DeclarationReflection;

const aValue =
aRefl.type instanceof LiteralType
? aRefl.type.value
: -Infinity;
aRefl.type?.type === "literal" ? aRefl.type.value : -Infinity;
const bValue =
bRefl.type instanceof LiteralType
? bRefl.type.value
: -Infinity;
bRefl.type?.type === "literal" ? bRefl.type.value : -Infinity;

return aValue! < bValue!;
}
Expand All @@ -132,13 +127,9 @@ const sorts: Record<
const bRefl = b as DeclarationReflection;

const aValue =
aRefl.type instanceof LiteralType
? aRefl.type.value
: -Infinity;
aRefl.type?.type === "literal" ? aRefl.type.value : -Infinity;
const bValue =
bRefl.type instanceof LiteralType
? bRefl.type.value
: -Infinity;
bRefl.type?.type === "literal" ? bRefl.type.value : -Infinity;

return bValue! < aValue!;
}
Expand Down

0 comments on commit f1c071c

Please sign in to comment.