GitHub
App
Preparing search index...
The search index is not available
CCC Docs
CCC Docs
@ckb-ccc core
index
ccc
mol
option
Function option
option
<
Encodable
,
Decoded
>
(
innerCodec
)
:
Codec
<
Encodable
|
undefined
|
null
,
Decoded
|
undefined
>
Option is a dynamic-size type. Serializing an option depends on whether it is empty or not:
if it's empty, there is zero bytes (the size is 0).
if it's not empty, just serialize the inner item (the size is same as the inner item's size).
Type Parameters
Encodable
Decoded
Parameters
innerCodec
:
CodecLike
<
Encodable
,
Decoded
>
Returns
Codec
<
Encodable
|
undefined
|
null
,
Decoded
|
undefined
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
GitHub
App
CCC Docs
Loading...
Option is a dynamic-size type. Serializing an option depends on whether it is empty or not: