Ensure Range/RangeInclusive variant check does not fail on encoding (#4437)
This commit is contained in:
@@ -159,6 +159,8 @@ export function encodeTypeDef (CodecRegistry: CodecRegistry, typeDef: TypeDef):
|
||||
: encodeType(CodecRegistry, typeDef);
|
||||
}
|
||||
|
||||
export function withTypeString (CodecRegistry: CodecRegistry, typeDef: Omit<TypeDef, 'type'>): TypeDef {
|
||||
return objectSpread({}, typeDef, { type: encodeType(CodecRegistry, typeDef as TypeDef, false) });
|
||||
export function withTypeString (CodecRegistry: CodecRegistry, typeDef: Omit<TypeDef, 'type'> & { type?: string }): TypeDef {
|
||||
return objectSpread({}, typeDef, {
|
||||
type: encodeType(CodecRegistry, typeDef as TypeDef, false)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user