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

x/yano3nora_tsutils/main.ts>DeepNonNullable

TypeScript Utilities as a npm dual package by Deno.
Latest
type alias DeepNonNullable
import { type DeepNonNullable } from "https://deno.land/x/yano3nora_tsutils@v0.29.0/main.ts";

Examples

type User = { id: number profile: null | { name: string age: number email: string } }

type NonNullableUser = DeepNonNullable const u: NonNullableUser = { id: 1, profile: null // error }

definition: [P in keyof T]: T[P] extends object ? DeepNonNullable<T[P]> : NonNullable<T[P]>