Skip to content

isBoolean() function

n が Boolean の場合は true を返します。

Signature:

typescript
isBoolean: <T>(input: T) => input is T & boolean

Example

ts
isBoolean(true); // true
isBoolean(null); // false
isBoolean("FxTS"); // false

Open Source Code

Released under the Apache-2.0 License.