Skip to content

Commit

Permalink
fix(@formatjs/intl): fix type decl for createIntl, fix #2320
Browse files Browse the repository at this point in the history
  • Loading branch information
longlho committed Nov 19, 2020
1 parent 7317200 commit f129d60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/intl/src/create-intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ import {formatMessage} from './message';
import {formatList} from './list';
import {formatDisplayName} from './displayName';

export interface CreateIntlFn<T = string> {
(config: OptionalIntlConfig<T>, cache?: IntlCache): IntlShape<T>;
export interface CreateIntlFn<
T = string,
C extends OptionalIntlConfig<T> = OptionalIntlConfig<T>,
S extends IntlShape<T> = IntlShape<T>
> {
(config: C, cache?: IntlCache): S;
}

/**
Expand Down

0 comments on commit f129d60

Please sign in to comment.