Docs
CodeRabbit
Cloudflare
Railway
SerpAPI
AG Grid
Netlify
Clerk
WorkOS
OpenRouter
Unkey
Electric
Sentry
Prisma
CodeRabbit
Cloudflare
Railway
SerpAPI
AG Grid
Netlify
Clerk
WorkOS
OpenRouter
Unkey
Electric
Sentry
Prisma
Class References
Function References
Interface References
Type Alias References
Variable References

DeepPartial

Type Alias: DeepPartial<T>

ts
type DeepPartial<T> = T extends ReadonlyArray<infer U> ? DeepPartial<U>[] : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;
type DeepPartial<T> = T extends ReadonlyArray<infer U> ? DeepPartial<U>[] : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;

Defined in: packages/ai/src/types.ts:389

Recursive — every nested field becomes optional. Used as the type on a streaming structured-output part since the progressive JSON parse hands back objects whose fields are only filled in as bytes arrive. Defaulted in so untyped parts keep their existing shape.

Type Parameters

T