22
33A TypeScript / JavaScript implementation of the WRAP standard, including all fundamental types & algorithms.
44
5+ # Reference
6+
57## Types
68
79### CoreClient
@@ -93,7 +95,7 @@ export interface CoreClient extends Invoker, UriResolverHandler<unknown> {
9395 */
9496 getManifest<TUri extends Uri | string >(
9597 uri : TUri
96- ): Promise <Result <WrapManifest , Error >>;
98+ ): Promise <Result <WrapManifest , WrapError >>;
9799
98100 /**
99101 * returns a file contained in a wrap package
@@ -105,7 +107,7 @@ export interface CoreClient extends Invoker, UriResolverHandler<unknown> {
105107 getFile<TUri extends Uri | string >(
106108 uri : TUri ,
107109 options : GetFileOptions
108- ): Promise <Result <string | Uint8Array , Error >>;
110+ ): Promise <Result <string | Uint8Array , WrapError >>;
109111
110112 /**
111113 * returns the interface implementations associated with an interface URI
@@ -118,7 +120,7 @@ export interface CoreClient extends Invoker, UriResolverHandler<unknown> {
118120 getImplementations<TUri extends Uri | string >(
119121 uri : TUri ,
120122 options : GetImplementationsOptions
121- ): Promise <Result <TUri [], Error >>;
123+ ): Promise <Result <TUri [], WrapError >>;
122124
123125 /**
124126 * Validate a wrapper, given a URI.
@@ -131,7 +133,7 @@ export interface CoreClient extends Invoker, UriResolverHandler<unknown> {
131133 validate<TUri extends Uri | string >(
132134 uri : TUri ,
133135 options ? : ValidateOptions
134- ): Promise <Result <true , Error >>;
136+ ): Promise <Result <true , WrapError >>;
135137}
136138
137139```
@@ -193,7 +195,7 @@ export interface InvokeOptions<TUri extends Uri | string = string> {
193195 *
194196 * @template TData Type of the invoke result data.
195197 */
196- export type InvokeResult <TData = unknown > = Result <TData , Error >;
198+ export type InvokeResult <TData = unknown > = Result <TData , WrapError >;
197199
198200/**
199201 * Provides options for the invoker to set based on the state of the invocation.
@@ -580,7 +582,7 @@ export interface MaybeUriOrManifest {
580582 invoker : Invoker ,
581583 wrapper : Uri ,
582584 uri : Uri
583- ): Promise <Result <MaybeUriOrManifest , Error >>
585+ ): Promise <Result <MaybeUriOrManifest , WrapError >>
584586` ` `
585587
586588#### getFile
@@ -598,7 +600,7 @@ export interface MaybeUriOrManifest {
598600 invoker : Invoker ,
599601 wrapper : Uri ,
600602 path : string
601- ): Promise <Result <Uint8Array | undefined , Error >>
603+ ): Promise <Result <Uint8Array | undefined , WrapError >>
602604` ` `
603605
604606## Uri Resolution
0 commit comments