@internal
(t: Sort)
| 56 | |
| 57 | /** @internal */ |
| 58 | function isPair(t: Sort): t is readonly [string, SortDirection] { |
| 59 | if (Array.isArray(t) && t.length === 2) { |
| 60 | try { |
| 61 | prepareDirection(t[1]); |
| 62 | return true; |
| 63 | } catch { |
| 64 | return false; |
| 65 | } |
| 66 | } |
| 67 | return false; |
| 68 | } |
| 69 | |
| 70 | function isDeep(t: Sort): t is ReadonlyArray<readonly [string, SortDirection]> { |
| 71 | return Array.isArray(t) && Array.isArray(t[0]); |
no test coverage detected