Skip to content

Commit 325233c

Browse files
rsanchezGerrit0
authored andcommitted
Rename internal-first sort strategy to external-last
1 parent 02a14c0 commit 325233c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/lib/utils/sort.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const SORT_STRATEGIES = [
1919
"visibility",
2020
"required-first",
2121
"kind",
22-
"internal-first",
22+
"external-last",
2323
] as const;
2424

2525
export type SortStrategy = (typeof SORT_STRATEGIES)[number];
@@ -152,7 +152,7 @@ const sorts: Record<
152152
kind(a, b, { kindSortOrder }) {
153153
return kindSortOrder.indexOf(a.kind) < kindSortOrder.indexOf(b.kind);
154154
},
155-
"internal-first"(a, b) {
155+
"external-last"(a, b) {
156156
return !a.flags.isExternal && b.flags.isExternal;
157157
},
158158
};

src/test/utils/sort.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ describe("Sort", () => {
209209
);
210210
});
211211

212-
it("Should sort by internal first", () => {
212+
it("Should sort by external last", () => {
213213
const arr = [
214214
new DeclarationReflection("a", ReflectionKind.Function),
215215
new DeclarationReflection("b", ReflectionKind.Function),
@@ -219,7 +219,7 @@ describe("Sort", () => {
219219
arr[1].setFlag(ReflectionFlag.External, false);
220220
arr[2].setFlag(ReflectionFlag.External, true);
221221

222-
sortReflections(arr, ["internal-first"]);
222+
sortReflections(arr, ["external-last"]);
223223
equal(
224224
arr.map((r) => r.name),
225225
["b", "a", "c"],

0 commit comments

Comments
 (0)