(type: DevFixType, text: string)
| 127 | } |
| 128 | |
| 129 | static applyFixes(type: DevFixType, text: string): Error | null { |
| 130 | try { |
| 131 | const apply = ({ |
| 132 | 'detector': DevTools.applyDetectorHints, |
| 133 | 'dynamic': DevTools.applyDynamicThemeFixes, |
| 134 | 'filter': DevTools.applyInversionFixes, |
| 135 | 'static': DevTools.applyStaticThemes, |
| 136 | } as Record<DevFixType, (text: string) => any>)[type]; |
| 137 | apply(text); |
| 138 | return null; |
| 139 | } catch (err: any) { |
| 140 | return err as Error; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | static resetFixes(type: DevFixType): void { |
| 145 | const reset = ({ |