class Foo extends Schema.Class<Foo>("Foo")({
a: Schema.String,
b: Schema.Boolean,
c: Schema.Number,
d: Schema.Number
}){}
const dosomething = (f: Foo) => {
return f.c + 42
}
const res = dosomething(Foo.make({c: 5})) // Foo.make needs a, b and d obviously
assert(res === 47)
class Foo extends Schema.Class<Foo>("Foo")({
a: Schema.String,
b: Schema.Boolean,
c: Schema.Number,
d: Schema.Number
}){}
const dosomething = (f: Foo) => {
return f.c + 42
}
const res = dosomething(Foo.make({c: 5})) // Foo.make needs a, b and d obviously
assert(res === 47)