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

Function installLegacyConfigWarnings

packages/runtime-core/src/compat/globalConfig.ts:39–63  ·  view source on GitHub ↗
(config: AppConfig)

Source from the content-addressed store, hash-verified

37
38// dev only
39export function installLegacyConfigWarnings(config: AppConfig): void {
40 const legacyConfigOptions: Record<string, DeprecationTypes> = {
41 silent: DeprecationTypes.CONFIG_SILENT,
42 devtools: DeprecationTypes.CONFIG_DEVTOOLS,
43 ignoredElements: DeprecationTypes.CONFIG_IGNORED_ELEMENTS,
44 keyCodes: DeprecationTypes.CONFIG_KEY_CODES,
45 productionTip: DeprecationTypes.CONFIG_PRODUCTION_TIP,
46 }
47
48 Object.keys(legacyConfigOptions).forEach(key => {
49 let val = (config as any)[key]
50 Object.defineProperty(config, key, {
51 enumerable: true,
52 get() {
53 return val
54 },
55 set(newVal) {
56 if (!isCopyingConfig) {
57 warnDeprecation(legacyConfigOptions[key], null)
58 }
59 val = newVal
60 },
61 })
62 })
63}
64
65export function installLegacyOptionMergeStrats(config: AppConfig): void {
66 config.optionMergeStrategies = new Proxy({} as any, {

Callers 1

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected