import * as tsafe from "https://deno.land/x/tsafe@v1.8.5/mod.ts";
Functions
f flip | Flip the value of a boolean without having to reference it twice after running flip(x.y, "z") x.y.z !== x.y.z, https://docs.tsafe.dev/flip |
f is | |
Removes the enumerable properties whose values are undefined. | |
Always return null but pretends it returns an object of type T | |
Type Aliases
T Id | Ensure that a that a specific type that we are declaring extends a more generic type |
T Not | |
Return type of objectEntries https://docs.tsafe.dev/objectentries | |
Return type of objectFromEntries https://docs.tsafe.dev/objectFromEntries | |
Shorthand for Parameters[0] https://docs.tsafe.dev/param0 | |
PickOptionals<{ p1: string; p2?: string; p3?: number; }> is the type { p2: string; p3: number; } | |
PickRequired<{ p1: string; p2?: string; p3?: number; p4: string; }> is the type { p1: string; p4: number; } | |
Use case: declare const pr: Promise<string[]>; const x: UnpackPromise; <== x is string[] |