Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
type alias Optionalize
Re-export
import { type Optionalize } from "https://deno.land/x/discordeno@17.2.0/plugins/validations/deps.ts";

Makes all of properties in T optional when they're null | undefined it is recursive

definition: T extends object ? T extends Array<unknown> ? number extends T["length"] ? T[number] extends object ? Array<OptionalizeAux<T[number]>> : T : Partial<T> : OptionalizeAux<T> : T