# CompactTypeBoolean

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

[**@midnight-ntwrk/compact-runtime v0.9.0**](https://docs.midnight.network/api-reference/compact-runtime.md)

***

[@midnight-ntwrk/compact-runtime](https://docs.midnight.network/api-reference/compact-runtime/globals.md) / CompactTypeBoolean

# Class: CompactTypeBoolean

Runtime type of the builtin `Boolean` type

## Implements[​](#implements "Direct link to Implements")

* [`CompactType`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/CompactType.md)<`boolean`>

## Constructors[​](#constructors "Direct link to Constructors")

### Constructor[​](#constructor "Direct link to Constructor")

```
new CompactTypeBoolean(): CompactTypeBoolean;
```

#### Returns[​](#returns "Direct link to Returns")

`CompactTypeBoolean`

## Methods[​](#methods "Direct link to Methods")

### alignment()[​](#alignment "Direct link to alignment()")

```
alignment(): Alignment;
```

The field-aligned binary alignment of this type.

#### Returns[​](#returns-1 "Direct link to Returns")

[`Alignment`](https://docs.midnight.network/api-reference/compact-runtime/type-aliases/Alignment.md)

#### Implementation of[​](#implementation-of "Direct link to Implementation of")

[`CompactType`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/CompactType.md).[`alignment`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/CompactType.md#alignment)

***

### fromValue()[​](#fromvalue "Direct link to fromValue()")

```
fromValue(value): boolean;
```

Converts this type's field-aligned binary representation to its TypeScript representation destructively; (partially) consuming the input, and ignoring superflous data for chaining.

#### Parameters[​](#parameters "Direct link to Parameters")

##### value[​](#value "Direct link to value")

[`Value`](https://docs.midnight.network/api-reference/compact-runtime/type-aliases/Value.md)

#### Returns[​](#returns-2 "Direct link to Returns")

`boolean`

#### Implementation of[​](#implementation-of-1 "Direct link to Implementation of")

[`CompactType`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/CompactType.md).[`fromValue`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/CompactType.md#fromvalue)

***

### toValue()[​](#tovalue "Direct link to toValue()")

```
toValue(value): Value;
```

Converts this type's TypeScript representation to its field-aligned binary representation

#### Parameters[​](#parameters-1 "Direct link to Parameters")

##### value[​](#value-1 "Direct link to value")

`boolean`

#### Returns[​](#returns-3 "Direct link to Returns")

[`Value`](https://docs.midnight.network/api-reference/compact-runtime/type-aliases/Value.md)

#### Implementation of[​](#implementation-of-2 "Direct link to Implementation of")

[`CompactType`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/CompactType.md).[`toValue`](https://docs.midnight.network/api-reference/compact-runtime/interfaces/CompactType.md#tovalue)
