Skip to content

Commit

Permalink
Merge pull request #730 from sebgroup/fix/expose-types-for-translatio…
Browse files Browse the repository at this point in the history
…n-context

fix(translation-context): expose types
  • Loading branch information
mario-subo authored Apr 1, 2022
2 parents bc83031 + 72d6468 commit a9adaff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/contexts/translationContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { isEmpty } from "@sebgroup/frontend-tools/isEmpty";
import pupa from "pupa";
import React from "react";

type TranslationValues = string | Array<Translation>;
export type TranslationValues = string | Array<Translation>;

interface Translation {
export interface Translation {
[key: string]: TranslationValues;
}

Expand Down Expand Up @@ -35,7 +35,7 @@ export interface TranslationProviderProps {
*/
fallbackTranslation?: Translation;
/**
* The response path to the translation, defaulted to "result.content".
* The response path to the translation, defaulted to `result.content`.
* This is to map the response into actual translation key mapping.
*/
translationPath?: string;
Expand Down

0 comments on commit a9adaff

Please sign in to comment.