Align Range/RangeInclusive handling with other definitions (#4489)

* Align Range/RangeInclusive handling with other definitions

* Split RangeInclusive class

* Rnage -> Range TypeDef

* Correct Range wrappers

* CHANGELOG

* Remove extra Range CHANGELOG entry

* Update CHANGELOG.md
This commit is contained in:
Jaco
2022-01-24 08:46:35 +02:00
committed by GitHub
parent b94cf566c9
commit db5b0986c4
11 changed files with 71 additions and 29 deletions
+1
View File
@@ -235,6 +235,7 @@ export const typeEncoders: Record<TypeDefInfo, (registry: Registry, definitions:
[TypeDefInfo.Option]: tsOption,
[TypeDefInfo.Plain]: tsPlain,
[TypeDefInfo.Range]: errorUnhandled,
[TypeDefInfo.RangeInclusive]: errorUnhandled,
[TypeDefInfo.Result]: tsResult,
[TypeDefInfo.Set]: tsSet,
[TypeDefInfo.Si]: tsSi,
+4
View File
@@ -174,6 +174,10 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
throw new Error(`TypeDefInfo.Range: Not implemented on ${stringify(typeDef)}`);
},
[TypeDefInfo.RangeInclusive]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
throw new Error(`TypeDefInfo.RangeInclusive: 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)}`);
},