( value: mixed, propName: string, )
| 136 | } |
| 137 | |
| 138 | export function checkCSSPropertyStringCoercion( |
| 139 | value: mixed, |
| 140 | propName: string, |
| 141 | ): void | string { |
| 142 | if (__DEV__) { |
| 143 | if (willCoercionThrow(value)) { |
| 144 | console.error( |
| 145 | 'The provided `%s` CSS property is an unsupported type %s.' + |
| 146 | ' This value must be coerced to a string before using it here.', |
| 147 | propName, |
| 148 | typeName(value), |
| 149 | ); |
| 150 | return testStringCoercion(value); // throw (to help callers find troubleshooting comments) |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | export function checkHtmlStringCoercion(value: mixed): void | string { |
| 156 | if (__DEV__) { |
no test coverage detected