Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>Boolean.And

👷 TypeScript's largest type utility library, now on Deno
Latest
type alias Boolean.And
import { type Boolean } from "https://deno.land/x/ts_toolbelt_unofficial@1.1.0/mod.ts";
const { And } = Boolean;

Logical && operator (behaves like the JS one)

Examples

Example 1

import {B} from 'ts-toolbelt.ts'

type test0 = B.And<B.True, B.False>          // False
type test1 = B.And<B.True, B.True>           // True
type test2 = B.And<B.True | B.False, B.True> // Boolean

Type Parameters

B1 extends Boolean
B2 extends Boolean
definition: { 0: { 0: 0; 1: 0; }; 1: { 0: 0; 1: 1; }; }[B1][B2]