-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
It looks like z.core.File changes added in v4.0.6 are not compatible with globalThis.File.
Looks like it's because the size and type properties in z.core.File are mutable, but are readonly in globalThis.File.
import { expectTypeOf, test } from 'vitest'
import * as z from 'zod'
test('repro', () => {
const file = new File([], 'test.txt')
expectTypeOf(z.file().parse(file)).toEqualTypeOf(file)
// 𐙘__𐙘 not equal because `size` and `type` are mutable
})Should be a quick fix, will open a PR in a few
Metadata
Metadata
Assignees
Labels
No labels