Function
compareSourceFilePosition
(
a: SourceFileLocation['position'],
b: SourceFileLocation['position'],
)
Source from the content-addressed store, hash-verified
| 272 | } |
| 273 | |
| 274 | function compareSourceFilePosition( |
| 275 | a: SourceFileLocation['position'], |
| 276 | b: SourceFileLocation['position'], |
| 277 | ): number { |
| 278 | if (!a && b) { |
| 279 | return -1; |
| 280 | } |
| 281 | if (a && !b) { |
| 282 | return 1; |
| 283 | } |
| 284 | if (a?.startLine !== b?.startLine) { |
| 285 | return (a?.startLine ?? 0) - (b?.startLine ?? 0); |
| 286 | } |
| 287 | return 0; |
| 288 | } |
| 289 | |
| 290 | // @TODO rethink implementation |
| 291 | export function applyScoreColor( |
Tested by
no test coverage detected