mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-09-28 15:14:45 +02:00
parent
1995c67884
commit
40e6dbe8f7
@ -58,7 +58,7 @@ const formatMessage: MessageFormatter = (id, options = {}) => {
|
|||||||
|
|
||||||
if (!values) return message;
|
if (!values) return message;
|
||||||
|
|
||||||
return getMessageFormatter(message, locale).format(values);
|
return getMessageFormatter(message, locale).format(values) as string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatTime: TimeFormatter = (t, options) =>
|
const formatTime: TimeFormatter = (t, options) =>
|
||||||
|
@ -32,7 +32,7 @@ export interface MessageObject {
|
|||||||
export type MessageFormatter = (
|
export type MessageFormatter = (
|
||||||
id: string | MessageObject,
|
id: string | MessageObject,
|
||||||
options?: MessageObject,
|
options?: MessageObject,
|
||||||
) => string | unknown;
|
) => string;
|
||||||
|
|
||||||
export type TimeFormatter = (
|
export type TimeFormatter = (
|
||||||
d: Date | number,
|
d: Date | number,
|
||||||
|
Loading…
Reference in New Issue
Block a user