Checks if the given value is Boolean.

Syntax

TypeScript
import { isBoolean } from '@opentf/std';

isBoolean(val: unknown): val is boolean;

Examples

TypeScript
isBoolean(true) //=> true
 
isBoolean(false) //=> true

isBoolean(null) //=> false

isBoolean(1) //=> false

isBoolean() //=> false
Last updated on
Edit this page