Files
explore/ui/shared/monaco/utils/sortByEndLineNumberAsc.ts
2024-03-07 18:46:33 +04:00

14 lines
340 B
TypeScript

import type * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
export default function sortByEndLineNumberAsc(a: monaco.editor.FindMatch, b: monaco.editor.FindMatch) {
if (a.range.endLineNumber < b.range.endLineNumber) {
return -1;
}
if (a.range.endLineNumber > b.range.endLineNumber) {
return 1;
}
return 0;
}