index.mjs 515 B

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