src/shared/utils/validator/index.js
function assertDeprecations(object, path, properties) {
  let errors = [];

  (properties || []).forEach(({ property, use }) => {
    if (get(object, property, undefined) !== undefined) {
      errors = [
        ...errors,
        {
          path,
          id: object.id,
          error: `${object.type} is using the '${property}' property. It's deprecated and will be removed.${use ? ` Use '${use}' instead` : ''}.`,
        },
      ];
    }
  });

  return errors;
}
function assertDeprecations(object, path, properties) {
  let errors = [];

  (properties || []).forEach(({ property, use }) => {
    if (get(object, property, undefined) !== undefined) {
      errors = [
        ...errors,
        {
          path,
          id: object.id,
          error: `${object.type} is using the '${property}' property. It's deprecated and will be removed.${use ? ` Use '${use}' instead` : ''}.`,
        },
      ];
    }
  });

  return errors;
}
function assertDeprecations ( object , path , properties ) { let errors = [ ] ; ( properties || [ ] ) . forEach ( ( { property , use } ) => { if ( get ( object , property , undefined ) !== undefined ) { errors = [ ... errors , { path , id : object . id , error : ` ${ object . type } ${ property } ${ use ? ` ${ use } ` : '' } ` , } , ] ; } } ) ; return errors ; }
Check for deprecated properties on the node. Returns array of errors
Check for deprecated properties on the node . Returns array of errors