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

x/live/deps.ts>OptionalKeys

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
type alias OptionalKeys
import { type OptionalKeys } from "https://deno.land/x/live@1.53.6/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]