We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e5b595 commit c172604Copy full SHA for c172604
src/tests/superValidate.test.ts
@@ -262,6 +262,21 @@ describe('Valibot', () => {
262
expect(() => valibot(schema)).not.toThrow();
263
});
264
265
+ /*
266
+ it('should work with FormPathLeaves and brand', async () => {
267
+ const schema = v.object({ id: v.brand(v.string(), 'Id') });
268
+ type T = Infer<typeof schema>;
269
+ type IdSchema = { id: string & v.Brand<"Id"> };
270
+ // ^? { id: string & Brand<"Id"> }
271
+
272
+ const a: FormPathLeaves<T> = 'id';
273
+ // @ts-expect-error Should handle brand
274
+ const b: FormPathLeaves<T> = 'id.length';
275
+ a;
276
+ b;
277
+ });
278
+ */
279
280
/* it('should have the correct Input and Output types', () => {
281
const logSchema = v.object({
282
id: v.nullish(v.string(), ''),
0 commit comments