Creating Encoded Structs from Schemas in TypeScript
Is there anything like
I'm thinking something like:
encodedStruct/typeStruct that corresponds to encodedSchema/typeSchema? typeSchema and encodedSchema return a Schema that loses the fact that it is a Struct.I'm thinking something like:
export const encodedStruct = <Fields extends S.Struct.Fields>(schema: S.Struct<Fields>): S.Struct<S.Struct.Encoded<Fields>> =>
S.make(AST.encodedAST(schema.ast))
