( key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, )
| 104 | } |
| 105 | |
| 106 | export function isCompatEnabled( |
| 107 | key: CompilerDeprecationTypes, |
| 108 | context: MergedParserOptions | TransformContext, |
| 109 | ): boolean { |
| 110 | const mode = getCompatValue('MODE', context) |
| 111 | const value = getCompatValue(key, context) |
| 112 | // in v3 mode, only enable if explicitly set to true |
| 113 | // otherwise enable for any non-false value |
| 114 | return mode === 3 ? value === true : value !== false |
| 115 | } |
| 116 | |
| 117 | export function checkCompatEnabled( |
| 118 | key: CompilerDeprecationTypes, |
no test coverage detected