Range as primitive (#3874)

* Range as primitive

* Result/Range

* INumber as Range inner

* Update

* .with on Range

* Basic range decoding

* With

* RangeName

* TypeDefInfo for Range
This commit is contained in:
Jaco
2021-08-14 09:14:53 +02:00
committed by GitHub
parent 9b0d260b33
commit ca17955d83
14 changed files with 83 additions and 122 deletions
+1
View File
@@ -189,6 +189,7 @@ const encoders: Record<TypeDefInfo, (registry: Registry, definitions: Record<str
[TypeDefInfo.Null]: errorUnhandled,
[TypeDefInfo.Option]: tsOption,
[TypeDefInfo.Plain]: tsPlain,
[TypeDefInfo.Range]: errorUnhandled,
[TypeDefInfo.Result]: tsResult,
[TypeDefInfo.Set]: tsSet,
[TypeDefInfo.Si]: tsSi,
+3
View File
@@ -129,6 +129,9 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
return typeDef.type;
},
[TypeDefInfo.Range]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
throw new Error(`TypeDefInfo.Range: Not implemented on ${stringify(typeDef)}`);
},
[TypeDefInfo.Set]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
throw new Error(`TypeDefInfo.Set: Not implemented on ${stringify(typeDef)}`);
},