You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
604 B

1 month ago
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var vue = require('vue');
  4. var error = require('../../utils/error.js');
  5. const useDeprecated = ({ from, replacement, scope, version, ref, type = "API" }, condition) => {
  6. vue.watch(() => vue.unref(condition), (val) => {
  7. if (val) {
  8. error.debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.
  9. For more detail, please visit: ${ref}
  10. `);
  11. }
  12. }, {
  13. immediate: true
  14. });
  15. };
  16. exports.useDeprecated = useDeprecated;
  17. //# sourceMappingURL=index.js.map