Effect CommunityEC
Effect Community3y ago
7 replies
Deleted User

Implementing Interfaces with S.Struct in TypeScript

Hi,
I've a hard time figuring out how I can implement an interface, like Equal or Hash (in order to use it in an HashSet) with a S.struct like this one :
const Person = S.struct({
  name: S.string,
  age: S.number,
})

type Person = S.To<typeof Person>
Was this page helpful?