Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deco/deps.ts>OptionalKeys

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Go to Latest
type alias OptionalKeys
import { type OptionalKeys } from "https://deno.land/x/deco@1.75.1/deps.ts";

OptionalKeys

Examples

type Props = { req: number; reqUndef: number | undefined; opt?: string; optUndef?: number | undefined; };

// Expect: "opt" | "optUndef" type Keys = OptionalKeys;

definition: [K in keyof T]-?: { } extends Pick<T, K> ? K : never[keyof T]