(cause: unknown, expected: number)
| 462 | } |
| 463 | |
| 464 | const matchesSqliteNumericCode = (cause: unknown, expected: number): boolean => { |
| 465 | const code = sqliteCodeFromCause(cause) |
| 466 | if (code === expected) { |
| 467 | return true |
| 468 | } |
| 469 | if (!Predicate.hasProperty(cause, "errno")) { |
| 470 | return false |
| 471 | } |
| 472 | return cause.errno === expected |
| 473 | } |
| 474 | |
| 475 | const matchesSqliteCode = (code: string, expected: string): boolean => |
| 476 | code === expected || code.startsWith(expected + "_") |
no test coverage detected