Remove undefined from type

You will want to use NonNullable:

type Foo = NonNullable<FooOrUndefined> // { bar: number; }

Sample

Leave a Comment