mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-23 03:12:10 +00:00
19 lines
297 B
TypeScript
19 lines
297 B
TypeScript
type LangList<T> = {
|
|
fr?: T
|
|
en?: T
|
|
es?: T
|
|
it?: T
|
|
}
|
|
|
|
export type Langs = "en" | "fr" | "es" | "it"
|
|
|
|
namespace LangList {
|
|
export function insert(from: LangList<any>, el: any, lang: Langs) {
|
|
if (typeof from !== "object") from = {}
|
|
from[lang] = el
|
|
return from
|
|
}
|
|
}
|
|
|
|
export default LangList
|