(value: unknown)
| 5 | description: |
| 6 | 'A custom scalar that can be either a string, a float, or an array of strings and/or floats', |
| 7 | serialize(value: unknown): string | number | (string | number)[] { |
| 8 | if ( |
| 9 | typeof value === 'string' || |
| 10 | typeof value === 'number' || |
| 11 | (Array.isArray(value) && |
| 12 | value.every(item => typeof item === 'string' || typeof item === 'number')) |
| 13 | ) { |
| 14 | return value |
| 15 | } |
| 16 | throw new TypeError('Value must be a string, a float, or an array of strings and/or floats') |
| 17 | }, |
| 18 | parseValue(value: unknown): string | number | (string | number)[] { |
| 19 | if ( |
| 20 | typeof value === 'string' || |
nothing calls this directly
no outgoing calls
no test coverage detected