• Preparing search index...
  • The search index is not available
Solana JavaScript SDK
  • Solana JavaScript SDK
  • @solana/codecs-data-structures
  • getNullableDecoder

Function getNullableDecoder

  • getNullableDecoder<TTo, TSize extends number>(
        item: FixedSizeDecoder<TTo, TSize>,
        config: NullableCodecConfig<NumberDecoder> & {
            noneValue: "zeroes";
            prefix: null;
        },
    ): FixedSizeDecoder<TTo | null, TSize>
  • Creates a decoder for an optional value using null as the None value.

    Type Parameters

    • TTo
    • TSize extends number

    Parameters

    • item: FixedSizeDecoder<TTo, TSize>

      The decoder to use for the value that may be present.

    • config: NullableCodecConfig<NumberDecoder> & { noneValue: "zeroes"; prefix: null }

      A set of config for the decoder.

    Returns FixedSizeDecoder<TTo | null, TSize>

    • Defined in packages/codecs-data-structures/src/nullable.ts:135
  • getNullableDecoder<TTo>(
        item: FixedSizeDecoder<TTo>,
        config: NullableCodecConfig<FixedSizeNumberDecoder> & {
            noneValue: "zeroes";
        },
    ): FixedSizeDecoder<TTo | null>
  • Creates a decoder for an optional value using null as the None value.

    Type Parameters

    • TTo

    Parameters

    • item: FixedSizeDecoder<TTo>

      The decoder to use for the value that may be present.

    • config: NullableCodecConfig<FixedSizeNumberDecoder> & { noneValue: "zeroes" }

      A set of config for the decoder.

    Returns FixedSizeDecoder<TTo | null>

    • Defined in packages/codecs-data-structures/src/nullable.ts:139
  • getNullableDecoder<TTo>(
        item: FixedSizeDecoder<TTo>,
        config: NullableCodecConfig<NumberDecoder> & { noneValue: "zeroes" },
    ): VariableSizeDecoder<TTo | null>
  • Creates a decoder for an optional value using null as the None value.

    Type Parameters

    • TTo

    Parameters

    • item: FixedSizeDecoder<TTo>

      The decoder to use for the value that may be present.

    • config: NullableCodecConfig<NumberDecoder> & { noneValue: "zeroes" }

      A set of config for the decoder.

    Returns VariableSizeDecoder<TTo | null>

    • Defined in packages/codecs-data-structures/src/nullable.ts:143
  • getNullableDecoder<TTo>(
        item: Decoder<TTo>,
        config?: NullableCodecConfig<NumberDecoder> & {
            noneValue?: ReadonlyUint8Array;
        },
    ): VariableSizeDecoder<TTo | null>
  • Creates a decoder for an optional value using null as the None value.

    Type Parameters

    • TTo

    Parameters

    • item: Decoder<TTo>

      The decoder to use for the value that may be present.

    • Optionalconfig: NullableCodecConfig<NumberDecoder> & { noneValue?: ReadonlyUint8Array }

      A set of config for the decoder.

    Returns VariableSizeDecoder<TTo | null>

    • Defined in packages/codecs-data-structures/src/nullable.ts:147

Settings

Member Visibility
Solana JavaScript SDK
  • Loading...

Generated using TypeDoc