1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-07-29 03:09:49 +00:00

Updated Interfaces

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-02-12 00:21:24 +01:00
parent 1cd9af0ddb
commit 87a25d2319
7 changed files with 13 additions and 120 deletions

View File

@ -5,8 +5,10 @@ type LangList<T> = {
it?: T
}
export type Langs = "en" | "fr" | "es" | "it"
namespace LangList {
export function insert(from: LangList<any>, el: any, lang: string) {
export function insert(from: LangList<any>, el: any, lang: Langs) {
if (typeof from !== "object") from = {}
from[lang] = el
return from