packages/wxa-core/src/decorators/methods.decorators.js
function Deprecate(methodDescriptor) {
    let {descriptor, key} = methodDescriptor;

    let fn = descriptor.value;

    descriptor.value = function(...args) {
        console.warn(`DEPRECATE: [${key}] This function will be removed in future versions.`);
        return fn.apply(this, args);
    };

    return {
        ...methodDescriptor,
        descriptor,
    };
}
function Deprecate(methodDescriptor) {
    let {descriptor, key} = methodDescriptor;

    let fn = descriptor.value;

    descriptor.value = function(...args) {
        console.warn(`DEPRECATE: [${key}] This function will be removed in future versions.`);
        return fn.apply(this, args);
    };

    return {
        ...methodDescriptor,
        descriptor,
    };
}
function Deprecate ( methodDescriptor ) { let { descriptor , key } = methodDescriptor ; let fn = descriptor . value ; descriptor . value = function ( ... args ) { console . warn ( ` ${ key } ` ) ; return fn . apply ( this , args ) ; } ; return { ... methodDescriptor , descriptor , } ; }
mark methods to deprecate. while developer call it, print a warning text to console

@param {any} methodDescriptor

@return {any}
mark methods to deprecate . while developer call it print a warning text to console