Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-03-11 09:43:23 +01:00
commit f235c62c58
31 changed files with 1474 additions and 0 deletions

15
interfaces/LangList.ts Normal file
View File

@@ -0,0 +1,15 @@
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