( value: mixed, attributeName: string, )
| 72 | } |
| 73 | |
| 74 | export function checkAttributeStringCoercion( |
| 75 | value: mixed, |
| 76 | attributeName: string, |
| 77 | ): void | string { |
| 78 | if (__DEV__) { |
| 79 | if (willCoercionThrow(value)) { |
| 80 | console.error( |
| 81 | 'The provided `%s` attribute is an unsupported type %s.' + |
| 82 | ' This value must be coerced to a string before using it here.', |
| 83 | attributeName, |
| 84 | typeName(value), |
| 85 | ); |
| 86 | return testStringCoercion(value); // throw (to help callers find troubleshooting comments) |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | export function checkKeyStringCoercion(value: mixed): void | string { |
| 92 | if (__DEV__) { |
no test coverage detected