Skip to content

Commit 2dd1d15

Browse files
committed
refactoring
1 parent 6607e42 commit 2dd1d15

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/composer.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,9 @@ export function createComposer<
530530
*/
531531

532532
// getPostTranslationHandler
533-
const getPostTranslationHandler = (): PostTranslationHandler<
534-
Message
535-
> | null => (isFunction(_postTranslation) ? _postTranslation : null)
533+
function getPostTranslationHandler(): PostTranslationHandler<Message> | null {
534+
return isFunction(_postTranslation) ? _postTranslation : null
535+
}
536536

537537
// setPostTranslationHandler
538538
function setPostTranslationHandler(
@@ -543,7 +543,9 @@ export function createComposer<
543543
}
544544

545545
// getMissingHandler
546-
const getMissingHandler = (): MissingHandler | null => _missing
546+
function getMissingHandler(): MissingHandler | null {
547+
return _missing
548+
}
547549

548550
// setMissingHandler
549551
function setMissingHandler(handler: MissingHandler | null): void {
@@ -695,8 +697,9 @@ export function createComposer<
695697
}
696698

697699
// getLocaleMessage
698-
const getLocaleMessage = (locale: Locale): LocaleMessageDictionary<Message> =>
699-
(_messages.value[locale] || {}) as LocaleMessageDictionary<Message>
700+
function getLocaleMessage(locale: Locale): LocaleMessageDictionary<Message> {
701+
return (_messages.value[locale] || {}) as LocaleMessageDictionary<Message>
702+
}
700703

701704
// setLocaleMessage
702705
function setLocaleMessage(
@@ -720,8 +723,9 @@ export function createComposer<
720723
}
721724

722725
// getDateTimeFormat
723-
const getDateTimeFormat = (locale: Locale): DateTimeFormat =>
724-
_datetimeFormats.value[locale] || {}
726+
function getDateTimeFormat(locale: Locale): DateTimeFormat {
727+
return _datetimeFormats.value[locale] || {}
728+
}
725729

726730
// setDateTimeFormat
727731
function setDateTimeFormat(locale: Locale, format: DateTimeFormat): void {
@@ -741,8 +745,9 @@ export function createComposer<
741745
}
742746

743747
// getNumberFormat
744-
const getNumberFormat = (locale: Locale): NumberFormat =>
745-
_numberFormats.value[locale] || {}
748+
function getNumberFormat(locale: Locale): NumberFormat {
749+
return _numberFormats.value[locale] || {}
750+
}
746751

747752
// setNumberFormat
748753
function setNumberFormat(locale: Locale, format: NumberFormat): void {

0 commit comments

Comments
 (0)