name: Bool
description: Representation for a boolean value in the system. It extends the base JS Boolean class
Hierarchy
Boolean
↳ Bool
Implements
Constructors
constructor
⊕ new Bool(value?: Bool | Boolean | Uint8Array | boolean | number): Bool
Defined in primitive/Bool.ts:15
Parameters:
| Name | Type | Default value |
|---|---|---|
Default value value | Bool | Boolean | Uint8Array | boolean | number | false |
Returns: Bool
Properties
<Static> Boolean
● Boolean: BooleanConstructor
Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:540
Accessors
encodedLength
get encodedLength(): number
Defined in primitive/Bool.ts:35
description: The length of the value when encoded as a Uint8Array
Returns: number
isEmpty
get isEmpty(): boolean
Defined in primitive/Bool.ts:42
description: Checks if the value is an empty value (always false)
Returns: boolean
Methods
eq
▸ eq(other?: any): boolean
Defined in primitive/Bool.ts:49
description: Compares the value of the input to see if there is a match
Parameters:
| Name | Type |
|---|---|
Optional other | any |
Returns: boolean
toHex
▸ toHex(): string
Defined in primitive/Bool.ts:60
description: Returns a hex string representation of the value
Returns: string
toJSON
▸ toJSON(): any
Implementation of Codec.toJSON
Defined in primitive/Bool.ts:67
description: Converts the Object to JSON, typically used for RPC transfers
Returns: any
toString
▸ toString(): string
Implementation of Codec.toString
Defined in primitive/Bool.ts:74
description: Returns the string representation of the value
Returns: string
toU8a
▸ toU8a(isBare?: undefined | false | true): Uint8Array
Defined in primitive/Bool.ts:82
description: Encodes the value as a Uint8Array as per the parity-codec specifications
Parameters:
| Name | Type | Description |
|---|---|---|
Optional isBare | undefined | false | true | true when the value has none of the type-specific prefixes (internal) |
Returns: Uint8Array