Skip to content

Commit

Permalink
Fix names and clean a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Sep 13, 2023
1 parent d3be54d commit 88525b3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
13 changes: 6 additions & 7 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ import type {
} from './types';
import * as ReportActionsUtils from '../libs/ReportActionsUtils';

type States = Record<
keyof typeof COMMON_CONST.STATES,
{
stateISO: string;
stateName: string;
}
>;
type StateValue = {
stateISO: string;
stateName: string;
};

type States = Record<keyof typeof COMMON_CONST.STATES, StateValue>;

type AllCountries = Record<keyof typeof CONST.ALL_COUNTRIES, string>;

Expand Down
4 changes: 2 additions & 2 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import type {
SetTheRequestParams,
UpdatedTheRequestParams,
RemovedTheRequestParams,
Translation,
EnglishTranslation,
} from './types';

/* eslint-disable max-len */
Expand Down Expand Up @@ -2249,4 +2249,4 @@ export default {
selectSuggestedAddress: 'Por favor, selecciona una dirección sugerida',
},
},
} satisfies Translation;
} satisfies EnglishTranslation;
8 changes: 4 additions & 4 deletions src/languages/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,17 @@ type TranslateType<TObject, TPath extends string> = TPath extends keyof TObject
: never
: never;

type Translation = typeof en;
type EnglishTranslation = typeof en;

type TranslationPaths = FlattenObject<Translation>;
type TranslationPaths = FlattenObject<EnglishTranslation>;

type TranslationFlatObject = {
[TKey in TranslationPaths]: TranslateType<Translation, TKey>;
[TKey in TranslationPaths]: TranslateType<EnglishTranslation, TKey>;
};

export type {
TranslationBase,
Translation,
EnglishTranslation,
TranslationFlatObject,
AddressLineParams,
CharacterLimitParams,
Expand Down

0 comments on commit 88525b3

Please sign in to comment.