import * as S from "@effect/schema/Schema";
export const Supplier = S.struct({
name: S.optional(S.string),
location: S.optional(S.string, {
nullable: true,
default: null,
}),
})
const supplier = {
name: "blublelub"
}
const decodedSupplier = S.decodeUnknownSync(Supplier)(supplier)
console.log(decodedSupplier)
import * as S from "@effect/schema/Schema";
export const Supplier = S.struct({
name: S.optional(S.string),
location: S.optional(S.string, {
nullable: true,
default: null,
}),
})
const supplier = {
name: "blublelub"
}
const decodedSupplier = S.decodeUnknownSync(Supplier)(supplier)
console.log(decodedSupplier)