diff --git a/packages/intl/src/create-intl.ts b/packages/intl/src/create-intl.ts index 7eac8e197e..d43b881f8f 100644 --- a/packages/intl/src/create-intl.ts +++ b/packages/intl/src/create-intl.ts @@ -15,8 +15,12 @@ import {formatMessage} from './message'; import {formatList} from './list'; import {formatDisplayName} from './displayName'; -export interface CreateIntlFn { - (config: OptionalIntlConfig, cache?: IntlCache): IntlShape; +export interface CreateIntlFn< + T = string, + C extends OptionalIntlConfig = OptionalIntlConfig, + S extends IntlShape = IntlShape +> { + (config: C, cache?: IntlCache): S; } /**