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

Function assertCompatEnabled

packages/runtime-core/src/compat/compatConfig.ts:593–603  ·  view source on GitHub ↗
(
  key: DeprecationTypes,
  instance: ComponentInternalInstance | null,
  ...args: any[]
)

Source from the content-addressed store, hash-verified

591 * Use this for features that are completely removed in non-compat build.
592 */
593export 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

Callers 10

createCompatAppFunction · 0.90
extendCtorFunction · 0.90
createCompatVueFunction · 0.90
getFunction · 0.90
installFilterMethodFunction · 0.90
getCompatChildrenFunction · 0.90
onFunction · 0.90
offFunction · 0.90
getCompatListenersFunction · 0.90

Calls 2

isCompatEnabledFunction · 0.70
warnDeprecationFunction · 0.70

Tested by

no test coverage detected