mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-07-23 17:29:50 +00:00
16
interfaces/LangList.ts
Normal file
16
interfaces/LangList.ts
Normal file
@ -0,0 +1,16 @@
|
||||
type LangList<T> = {
|
||||
fr?: T
|
||||
en?: T
|
||||
es?: T
|
||||
it?: T
|
||||
}
|
||||
|
||||
namespace LangList {
|
||||
export function insert(from: LangList<any>, el: any, lang: string) {
|
||||
if (typeof from !== "object") from = {}
|
||||
from[lang] = el
|
||||
return from
|
||||
}
|
||||
}
|
||||
|
||||
export default LangList
|
Reference in New Issue
Block a user