gt-react 10.4.3 → 10.5.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -56,7 +56,6 @@ type _Message = {
56
56
  $_hash?: string;
57
57
  };
58
58
  type _Messages = _Message[];
59
- type MFunctionType = <T extends string | null | undefined>(encodedMsg: T, options: Record<string, any>) => T extends string ? string : T;
60
59
 
61
60
  type TranslateIcuCallback = (params: {
62
61
  source: string;
@@ -80,7 +79,7 @@ type GTContextType = {
80
79
  registerIcuForTranslation: TranslateIcuCallback;
81
80
  registerJsxForTranslation: TranslateChildrenCallback;
82
81
  _tFunction: (message: string, options?: InlineTranslationOptions, preloadedTranslations?: Translations) => string;
83
- _mFunction: <T extends string | null | undefined>(encodedMsg: T, options?: Record<string, any>, preloadedTranslations?: Translations) => T extends string ? string : T;
82
+ _mFunction: (message: string, options?: Record<string, any>, preloadedTranslations?: Translations) => string;
84
83
  _filterMessagesForPreload: (_messages: _Messages) => _Messages;
85
84
  _preloadMessages: (_messages: _Messages) => Promise<Translations>;
86
85
  _dictionaryFunction: (id: string, options?: DictionaryTranslationOptions) => string;
@@ -793,6 +792,6 @@ declare function useLocaleDirection(locale?: string): 'ltr' | 'rtl';
793
792
  * const m = useMessages();
794
793
  * m(encodedMessage) // returns "My name is Brian" translated
795
794
  */
796
- declare function useMessages(_messages?: _Messages): MFunctionType;
795
+ declare function useMessages(_messages?: _Messages): (encodedMsg: string, options?: Record<string, any>) => string;
797
796
 
798
797
  export { Branch, ClientProvider, Currency, DateTime, GTContext, GTProvider, LocaleSelector, Num, Plural, RegionSelector, T, Var, decodeMsg, decodeOptions, msg, renderVariable, useDefaultLocale, useGT, useGTClass, useLocale, useLocaleDirection, useLocaleProperties, useLocaleSelector, useLocales, useMessages, useRegion, useRegionSelector, useRuntimeTranslation, useSetLocale, useTranslations };