Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/types/codec/index.ts>Result

Package publishing for deno.land/x/polkadot
Go to Latest
class Result
implements IResult<O, E>
extends Enum
import { Result } from "https://deno.land/x/polkadot@0.2.16/types/codec/index.ts";

Constructors

new
Result(
registry: Registry,
Ok: CodecClass<O> | string,
Err: CodecClass<E> | string,
value?: unknown,
)

Type Parameters

O extends Codec
E extends Codec

Properties

readonly
asErr: E
readonly
asOk: O
readonly
isEmpty: boolean
readonly
isErr: boolean
readonly
isOk: boolean

Static Methods

with<O extends Codec, E extends Codec>(Types: { Ok: CodecClass<O> | string; Err: CodecClass<E> | string; }): CodecClass<Result<O, E>>