Skip to content

Commit

Permalink
Rollback changes made on PR #1400 (#1402)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrodurek committed Nov 10, 2021
1 parent 4dd2c04 commit b64c638
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ts4.1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export interface TFunction<

type I18nKeyType<N extends Namespace> = TFuncKey<N> extends infer A ? A : never;
export interface TransProps<
K extends TFuncKey<N> extends infer A ? A : never,
N extends Namespace = DefaultNamespace,
E extends Element = HTMLDivElement
> extends React.HTMLProps<E> {
Expand All @@ -222,17 +223,19 @@ export interface TransProps<
count?: number;
defaults?: string;
i18n?: i18n;
i18nKey?: I18nKeyType<N> | I18nKeyType<N>[];
i18nKey?: K | K[];
ns?: N;
parent?: string | React.ComponentType<any> | null; // used in React.createElement if not null
tOptions?: {};
values?: {};
t?: TFunction<N>;
}

export function Trans<N extends Namespace = DefaultNamespace, E extends Element = HTMLDivElement>(
props: TransProps<N, E>,
): React.ReactElement;
export function Trans<
K extends TFuncKey<N> extends infer A ? A : never,
N extends Namespace = DefaultNamespace,
E extends Element = HTMLDivElement
>(props: TransProps<K, N, E>): React.ReactElement;

export function useSSR(initialI18nStore: Resource, initialLanguage: string): void;

Expand Down

0 comments on commit b64c638

Please sign in to comment.