( key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[] )
| 591 | * Use this for features that are completely removed in non-compat build. |
| 592 | */ |
| 593 | export function assertCompatEnabled( |
| 594 | key: DeprecationTypes, |
| 595 | instance: ComponentInternalInstance | null, |
| 596 | ...args: any[] |
| 597 | ): void { |
| 598 | if (!isCompatEnabled(key, instance)) { |
| 599 | throw new Error(`${key} compat has been disabled.`) |
| 600 | } else if (__DEV__) { |
| 601 | warnDeprecation(key, instance, ...args) |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | /** |
| 606 | * Use this for features where legacy usage is still possible, but will likely |
no test coverage detected