index.mjs 547 B

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