docs(notice): add example for passing Error directly with i18n key

This commit is contained in:
Slinetrac
2025-12-22 11:01:53 +08:00
parent 231517b5db
commit eafa08066d

View File

@@ -320,6 +320,7 @@ const baseShowNotice = (
*
* @example showNotice.success("profiles.page.feedback.notifications.batchDeleted");
* @example showNotice.error(err); // pass an Error directly
* @example showNotice.error("shared.feedback.notifications.common.refreshFailed", err); // Simply pass an Error directly; but we recommend using { err } with i18n key and placeholders.
* @example showNotice.error("profiles.page.feedback.errors.invalidUrl", { url }, 4000);
*/
export const showNotice: ShowNotice = Object.assign(baseShowNotice, {