(leafType: string | undefined)
| 43 | * union falls back to `json`, the most permissive shape that still validates. |
| 44 | */ |
| 45 | export function columnTypeForLeaf(leafType: string | undefined): ColumnDefinition['type'] { |
| 46 | switch (leafType) { |
| 47 | case 'string': |
| 48 | case 'number': |
| 49 | case 'boolean': |
| 50 | case 'date': |
| 51 | case 'json': |
| 52 | return leafType |
| 53 | default: |
| 54 | return 'json' |
| 55 | } |
| 56 | } |
no outgoing calls
no test coverage detected