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

Function getCompatValue

packages/compiler-core/src/compat/compatConfig.ts:94–104  ·  view source on GitHub ↗
(
  key: CompilerDeprecationTypes | 'MODE',
  { compatConfig }: MergedParserOptions | TransformContext,
)

Source from the content-addressed store, hash-verified

92}
93
94function getCompatValue(
95 key: CompilerDeprecationTypes | 'MODE',
96 { compatConfig }: MergedParserOptions | TransformContext,
97) {
98 const value = compatConfig && compatConfig[key]
99 if (key === 'MODE') {
100 return value || 3 // compiler defaults to v3 behavior
101 } else {
102 return value
103 }
104}
105
106export function isCompatEnabled(
107 key: CompilerDeprecationTypes,

Callers 2

isCompatEnabledFunction · 0.85
warnDeprecationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected