()
| 174 | } |
| 175 | |
| 176 | function getInvalid() { |
| 177 | const style: Record<string, any> = {}; |
| 178 | const properties: string[] = []; |
| 179 | |
| 180 | let hasStyles = false; |
| 181 | |
| 182 | for (const warnings of getWarnings().values()) { |
| 183 | for (const warning of warnings) { |
| 184 | switch (warning.type) { |
| 185 | case "IncompatibleNativeProperty": |
| 186 | properties.push(warning.property); |
| 187 | break; |
| 188 | case "IncompatibleNativeValue": { |
| 189 | hasStyles = true; |
| 190 | style[warning.property] = warning.value; |
| 191 | break; |
| 192 | } |
| 193 | case "IncompatibleNativeFunctionValue": |
| 194 | // TODO |
| 195 | } |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | if (properties.length && hasStyles) { |
| 200 | return { |
| 201 | style, |
| 202 | properties, |
| 203 | }; |
| 204 | } else if (properties.length) { |
| 205 | return { properties }; |
| 206 | } else if (hasStyles) { |
| 207 | return { style }; |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | export function invalidProperty(...properties: string[]) { |
| 212 | return properties.map((property) => ({ |
no test coverage detected
searching dependent graphs…