Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/blocks/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/blocks@1.72.0/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]