mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-04-22 10:42:10 +00:00
16 lines
271 B
TypeScript
16 lines
271 B
TypeScript
type LangList<T> = {
|
|
[key in Langs]?: T
|
|
}
|
|
|
|
export type Langs = "en" | "fr"
|
|
|
|
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
|