(cause: unknown, expected: number)
| 505 | } |
| 506 | |
| 507 | const matchesSqliteNumericCode = (cause: unknown, expected: number): boolean => { |
| 508 | const code = sqliteCodeFromCause(cause) |
| 509 | if (code === expected) { |
| 510 | return true |
| 511 | } |
| 512 | if (!Predicate.hasProperty(cause, "errno")) { |
| 513 | return false |
| 514 | } |
| 515 | return cause.errno === expected |
| 516 | } |
| 517 | |
| 518 | const matchesSqliteCode = (code: string, expected: string): boolean => |
| 519 | code === expected || code.startsWith(expected + "_") |
no test coverage detected