fix: 🐛 message formatter type

 Closes: #109
This commit is contained in:
Christian Kaisermann 2020-11-23 07:56:58 -03:00
parent 1995c67884
commit 40e6dbe8f7
2 changed files with 2 additions and 2 deletions

View File

@ -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) =>

View File

@ -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,