greatly simplify type registry

This commit is contained in:
Joeri Exelmans 2025-03-20 17:29:13 +01:00
parent 303fa869a8
commit 4ca60784aa
3 changed files with 36 additions and 85 deletions

View file

@ -30,7 +30,7 @@ export class DefaultMap {
}
getdefault(key, addToMapping=false) {
return this.m.get(key) || (() => {
const val = this.defaultValue();
const val = this.defaultValue(key);
if (addToMapping)
this.m.set(key, val);
return val;