UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

24 lines 902 B
//#region src/libs/i18n/hydrate-admin-copy-defaults.d.ts type AdminTranslationBundle = Record<string, string>; /** * Adds `defaultMessage` values to admin copy descriptors from an admin * translation bundle. * * Use this before returning descriptors across API or plugin boundaries so * consumers have stable fallback text while their own translations load. It * preserves explicit defaults and leaves missing keys untouched. * * @example * ```ts * import { copy, hydrateAdminCopyDefaults } from "@lucidcms/core/plugin"; * * const details = hydrateAdminCopyDefaults( * { name: copy("admin:collections.blog.name") }, * { "collections.blog.name": "Blog" }, * ); * ``` */ declare const hydrateAdminCopyDefaults: <T>(value: T, adminTranslations?: AdminTranslationBundle) => T; //#endregion export { hydrateAdminCopyDefaults }; //# sourceMappingURL=hydrate-admin-copy-defaults.d.mts.map