* @inheritDoc
(value: string | number)
| 44 | * @inheritDoc |
| 45 | */ |
| 46 | override parseDate(value: string | number): Date { |
| 47 | // postgres-date returns `null` for a JS ISO string which has the `T` separator |
| 48 | if (typeof value === 'string' && value.charAt(10) === 'T') { |
| 49 | return new Date(value); |
| 50 | } |
| 51 | |
| 52 | /* v8 ignore next */ |
| 53 | if (typeof value === 'number') { |
| 54 | return new Date(value); |
| 55 | } |
| 56 | |
| 57 | // @ts-ignore fix wrong type resolution during build |
| 58 | const parsed = parseDate(value); |
| 59 | |
| 60 | /* v8 ignore next */ |
| 61 | if (parsed === null) { |
| 62 | return value as unknown as Date; |
| 63 | } |
| 64 | |
| 65 | return parsed as Date; |
| 66 | } |
| 67 | } |
no test coverage detected