Module

x/polkadot/mod.ts>types.Result

Package publishing for deno.land/x/polkadot
Go to Latest
class types.Result
implements IResult<O, E>
extends Enum
import { types } from "https://dotland.deno.dev/x/polkadot@0.2.35/mod.ts";
const { Result } = types;

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>>
import types.Result
import { types } from "https://dotland.deno.dev/x/polkadot@0.2.35/mod.ts";
const { Result } = types;