feat: update components

This commit is contained in:
2023-11-27 11:44:13 +01:00
parent 8cfedd7aa1
commit e4b29cad73
12 changed files with 174 additions and 120 deletions

View File

@@ -670,7 +670,7 @@ export type SCNationality =
* Translations for specific languages
* @see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
*/
export interface SCTranslations<T> {
export interface SCTranslations<T extends Record<string, string>> {
/**
* German translations
*/
@@ -691,8 +691,8 @@ type RecursivePartial<T> = {
[P in keyof T]-?: T[P] extends Array<infer U>
? Array<RecursivePartial<U>>
: T[P] extends object
? RecursivePartial<T[P]>
: T[P];
? RecursivePartial<T[P]>
: T[P];
};
/**
@@ -705,14 +705,14 @@ type SCRequiredTranslationKeys<T> = {
/**
* Type that allows mapping from available keys of SCTranslations to SCRequiredTranslationKeys
*/
type SCRequiredTranslation<T> = {
type SCRequiredTranslation<T extends Record<string, string>> = {
[key in keyof SCTranslations<T>]: SCRequiredTranslationKeys<T>;
};
/**
* Interface to be implemented by all Meta classes
*/
export interface SCMetaTranslations<T> {
export interface SCMetaTranslations<T extends Record<string, string>> {
/**
* Field translations
*/