@vuesax-alpha/nightly
Version:
A Component Library for Vue 3
26 lines (23 loc) • 605 B
JavaScript
import { watch, unref } from 'vue';
import '../../utils/index.mjs';
import { debugWarn } from '../../utils/error.mjs';
const useDeprecated = ({ scope, type = "API", from, version, replacement, ref }, condition) => {
watch(
() => unref(condition),
(val) => {
if (val) {
debugWarn(
scope,
`[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.
For more detail, please visit: ${ref}
`
);
}
},
{
immediate: true
}
);
};
export { useDeprecated };
//# sourceMappingURL=index.mjs.map