DefinitelyTyped/types/react-intl-redux/index.d.ts
Stefan Oestreicher 8dab4bcbc3 react-intl-redux: Add formats prop to IntlState (#40155)
* Add formats prop to IntlState

The updateIntl opts parameter can have a formats prop which is missing in the interface.
see https://github.com/ratson/react-intl-redux#formatting-data

* Make IntlState formats prop optional
2019-11-11 15:58:25 -08:00

25 lines
844 B
TypeScript

// Type definitions for react-intl-redux v0.1.0
// Project: https://github.com/ratson/react-intl-redux
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.3
import { Action, AnyAction } from "redux"
import { Provider as ReduxProvider } from "react-redux"
import { IntlProvider as ReactIntlProvider } from "react-intl"
interface IntlState {
locale: string
messages: any
formats?: any
}
interface IntlAction extends Action {
payload?: IntlState
}
export function intlReducer(state: IntlState | undefined, action: IntlAction): IntlState
export function updateIntl (opts: IntlState): IntlAction
export class IntlProvider extends ReactIntlProvider {}
export class Provider<A extends Action = AnyAction> extends ReduxProvider<A> {}