Skip to content

Commit d842000

Browse files
committed
fix: revert to z.infer
1 parent 8c6d0f1 commit d842000

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/index.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,14 @@ test('Optional values', async () => {
219219
expect(output.errors).toStrictEqual({});
220220
});
221221

222-
test('Braded values', async () => {
222+
test('Branded values', async () => {
223223
const schema = z.object({
224224
name: z.string().brand('name'),
225225
});
226226

227-
const output = await superValidate({ name: 'Name' }, schema);
227+
const data = new FormData();
228+
data.append('name', 'Name');
229+
const output = await superValidate(data, schema);
228230
expect(output.valid).equals(true);
229231
expect(output.message).toBeUndefined();
230232
expect(output.data.name).equals('Name');

src/lib/superValidate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ export async function superValidate<
536536
| FormData
537537
| URLSearchParams
538538
| URL
539-
| Partial<z.input<UnwrapEffects<T>>>
539+
| Partial<z.infer<UnwrapEffects<T>>>
540540
| null
541541
| undefined,
542542
schema: T,

0 commit comments

Comments
 (0)