Options
All
  • Public
  • Public/Protected
  • All
Menu

Module lib/interface

Index

Type Aliases

CIDString: Tagged<string, CID>

CID in string representation

Encoded<T, Format>: MatchRecord<T, Rule<Format[number]>>

Represents T encoded with a given Format.

example
type Format = [
[URL, { type: 'URL', href: string }]
[CID, { type: 'CID', cid: string }]
[Blob, { type: 'Blob', href: string }]
]

type Response<T> = Encoded<T, Format>

Type Parameters

  • T

  • Format extends Pattern<any, any>[]

EncodedError: { message: string }

Type declaration

  • message: string
EncodedURL: Tagged<string, URL>
FilesSource: Iterable<File> | Iterable<FileObject> | AsyncIterable<File> | AsyncIterable<FileObject>
MatchRecord<T, R>: { [ K in keyof T]: MatchRule<T[K], R> extends never ? MatchRecord<T[K], R> : MatchRule<T[K], R> }

Type Parameters

  • T

  • R extends Rule<any>

PinStatus: "queued" | "pinning" | "pinned" | "failed"
Result<X, T>: { ok: true; value: T } | { error: X; ok: false }

Type Parameters

  • X

  • T

StoreResponse<T>: Result<EncodedError, EncodedToken<T>>

Type Parameters

Tagged<T, Tag>: T & { tag?: Tag }

Define nominal type of U based on type of T. Similar to Opaque types in Flow

Type Parameters

  • T

  • Tag

Generated using TypeDoc