diff --git a/src/types.ts b/src/types.ts index 2aec55df2..a5217d4a2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5041,10 +5041,15 @@ export class ZodReadonly extends ZodType< > { _parse(input: ParseInput): ParseReturnType { const result = this._def.innerType._parse(input); - if (isValid(result)) { - result.value = Object.freeze(result.value); - } - return result; + const freeze = (data: ParseReturnType) => { + if (isValid(data)) { + data.value = Object.freeze(data.value); + } + return data; + }; + return isAsync(result) + ? result.then((data) => freeze(data)) + : freeze(result); } static create = (