(value: ToStringValue)
| 22 | // around this limitation, we use an opaque type that can only be obtained by |
| 23 | // passing the value through getToStringValue first. |
| 24 | export function toString(value: ToStringValue): string { |
| 25 | // The coercion safety check is performed in getToStringValue(). |
| 26 | // eslint-disable-next-line react-internal/safe-string-coercion |
| 27 | return '' + (value: any); |
| 28 | } |
| 29 | |
| 30 | export function getToStringValue(value: mixed): ToStringValue { |
| 31 | switch (typeof value) { |
no outgoing calls
no test coverage detected