* as v from "valibot" const SearchCriteria = v.pipe( v.object({ keyword: v.string(), area: v.string() }), v.brand("SearchCriteria"), ) type SearchCriteria = v.InferOutput<typeof SearchCriteria> const oldCriteria: SearchCriteria = { keyword: "Session-IPA", area: "Kyoto", secret: "TSKaigi Kansai"}; // error: TS2353 [ERROR]: Object literal may only specify known properties, and 'secret' does not exist // in type '{ keyword: string; area: string; } & Brand<"SearchCriteria">'. const criteria: SearchCriteria = v.parse(SearchCriteria, { keyword: "Session-IPA", area: "Kyoto", secret: "TSKaigi Kansai" })