# TS2447: The '…' operator is not allowed for boolean types. Consider using '…' instead.

> A bitwise operator such as | or & is applied to two booleans. Use the logical operator (|| or &&) instead.

## What it means

`|`, `&` and `^` work on numbers bit by bit. Applying them to two booleans turns the values into
numbers and back, which is almost always a typo for `||`, `&&` or `!==`.

## Example

```ts
declare const ready: boolean;
declare const forced: boolean;
export const go = ready | forced;
```

## How to fix

- Use the operator the message suggests: `||` for `|`, `&&` for `&`, `!==` for `^`.
- If you really want numeric bit operations, convert first: `Number(ready) | Number(forced)`.

Source: https://ts-r.dev/errors/TS2447/
