MCPcopy
hub / github.com/vuejs/core / isCompatEnabled

Function isCompatEnabled

packages/compiler-core/src/compat/compatConfig.ts:106–115  ·  view source on GitHub ↗
(
  key: CompilerDeprecationTypes,
  context: MergedParserOptions | TransformContext,
)

Source from the content-addressed store, hash-verified

104}
105
106export 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
117export function checkCompatEnabled(
118 key: CompilerDeprecationTypes,

Callers 5

onCloseTagFunction · 0.90
transformFilterFunction · 0.90
resolveComponentTypeFunction · 0.90
buildPropsFunction · 0.90
checkCompatEnabledFunction · 0.70

Calls 1

getCompatValueFunction · 0.85

Tested by

no test coverage detected