( source: Record<string, unknown>, key: string, )
| 39 | } |
| 40 | |
| 41 | export function readOptionalNumber( |
| 42 | source: Record<string, unknown>, |
| 43 | key: string, |
| 44 | ): number | undefined { |
| 45 | return typeof source[key] === 'number' ? Number(source[key]) : undefined |
| 46 | } |
| 47 | |
| 48 | export function readBoolean( |
| 49 | source: Record<string, unknown>, |