1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-07-13 05:15:10 +00:00
Files
cards-database/interfaces/LangList.ts
2020-02-12 00:21:24 +01:00

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