1 | import * as React from 'react';
|
2 | import { IntlShape } from '../types';
|
3 | export declare const Provider: React.Provider<IntlShape>;
|
4 | export declare const Context: React.Context<IntlShape>;
|
5 | export interface Opts<IntlPropName extends string = 'intl', ForwardRef extends boolean = false> {
|
6 | intlPropName?: IntlPropName;
|
7 | forwardRef?: ForwardRef;
|
8 | enforceContext?: boolean;
|
9 | }
|
10 | export declare type WrappedComponentProps<IntlPropName extends string = 'intl'> = {
|
11 | [k in IntlPropName]: IntlShape;
|
12 | };
|
13 | export declare type WithIntlProps<P> = Omit<P, keyof WrappedComponentProps> & {
|
14 | forwardedRef?: React.Ref<any>;
|
15 | };
|
16 | export default function injectIntl<IntlPropName extends string = 'intl', P extends WrappedComponentProps<IntlPropName> = WrappedComponentProps<any>>(WrappedComponent: React.ComponentType<P>, options?: Opts<IntlPropName, false>): React.FC<WithIntlProps<P>> & {
|
17 | WrappedComponent: React.ComponentType<P>;
|
18 | };
|
19 | export default function injectIntl<IntlPropName extends string = 'intl', P extends WrappedComponentProps<IntlPropName> = WrappedComponentProps<any>, T extends React.ComponentType<P> = any>(WrappedComponent: React.ComponentType<P>, options?: Opts<IntlPropName, true>): React.ForwardRefExoticComponent<React.PropsWithoutRef<WithIntlProps<React.PropsWithChildren<P>>> & React.RefAttributes<T>> & {
|
20 | WrappedComponent: React.ComponentType<P>;
|
21 | };
|
22 |
|
\ | No newline at end of file |