feat: add internationalization message handling in messages.ts

This commit is contained in:
2026-04-28 09:36:08 -05:00
committed by Kevin_Ramirez
parent d19445d77a
commit 827afe3ef0

View File

@@ -1,10 +1,10 @@
import * as generatedMessages from '$lib/paraglide/messages';
const normalizedMessageKeyCache = new Map();
const generatedMessagesAny = /** @type {Record<string, any>} */ (generatedMessages);
const normalizedMessageKeyCache = new Map<string, string>();
const generatedMessagesAny: Record<string, unknown> = generatedMessages;
export const m = new Proxy({}, {
get(_target, property) {
export const m = new Proxy({} as typeof generatedMessages, {
get(_target, property: string | symbol) {
if (typeof property !== 'string') {
return undefined;
}
@@ -36,4 +36,4 @@ export const m = new Proxy({}, {
return generatedMessagesAny[property];
}
});
}) as typeof generatedMessages;