Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/tsafe/index.ts>flip

🔩 The missing TypeScript utils
Go to Latest
function flip
import { flip } from "https://deno.land/x/tsafe@v1.6.5/index.ts";

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

Type Parameters

T extends Record<string, any>

Parameters

object: T
prop: KeyOfType<T, boolean>