( docA: CategorizedMethodMemberDoc, docB: CategorizedMethodMemberDoc, )
| 2 | |
| 3 | /** Sorts method members by deprecated status, member decorator, and name. */ |
| 4 | export function sortCategorizedMethodMembers( |
| 5 | docA: CategorizedMethodMemberDoc, |
| 6 | docB: CategorizedMethodMemberDoc, |
| 7 | ) { |
| 8 | // Sort deprecated docs to the end |
| 9 | if (!docA.isDeprecated && docB.isDeprecated) { |
| 10 | return -1; |
| 11 | } |
| 12 | |
| 13 | if (docA.isDeprecated && !docB.isDeprecated) { |
| 14 | return 1; |
| 15 | } |
| 16 | |
| 17 | // Break ties by sorting alphabetically on the name |
| 18 | if (docA.name < docB.name) { |
| 19 | return -1; |
| 20 | } |
| 21 | |
| 22 | if (docA.name > docB.name) { |
| 23 | return 1; |
| 24 | } |
| 25 | |
| 26 | return 0; |
| 27 | } |
| 28 | |
| 29 | /** Sorts property members by deprecated status, member decorator, and name. */ |
| 30 | export function sortCategorizedPropertyMembers( |
nothing calls this directly
no outgoing calls
no test coverage detected