Skip to content

Commit c810c77

Browse files
committed
move sort suggestion to bottom
1 parent 690bf5b commit c810c77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

typescript/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export = function ({ typescript }: { typescript: typeof ts_module }) {
2929
// }
3030
// prior.isGlobalCompletion
3131
// prior.entries[0]
32-
// Feature: Force Suggestion Sorting
33-
prior.entries = prior.entries.map((entry, index) => ({ ...entry, sortText: `${entry.sortText ?? ''}${index}` }))
3432
if (['bind', 'call', 'caller'].every(name => prior.entries.find(entry => entry.name === name))) {
3533
// Feature: Remove useless function props
3634
prior.entries = prior.entries.filter(e => !['Symbol', 'caller', 'prototype'].includes(e.name))
@@ -43,6 +41,8 @@ export = function ({ typescript }: { typescript: typeof ts_module }) {
4341
return entry
4442
})
4543
}
44+
// Feature: Force Suggestion Sorting
45+
prior.entries = prior.entries.map((entry, index) => ({ ...entry, sortText: `${entry.sortText ?? ''}${index}` }))
4646
// console.timeEnd('slow-down')
4747
return prior
4848
}

0 commit comments

Comments
 (0)