An IUriResolver implementation that initalizes wrappers from resolved packages. The PackageToWrapperResolver wraps an IUriResolver implementation and delegates resolution to it.

Type Parameters

  • TError

Hierarchy

  • PackageToWrapperResolver

Implements

Constructors

Properties

Methods

Constructors

  • Creates a PackageToWrapperResolver

    Type Parameters

    • TError

    Parameters

    • _innerResolver: IUriResolver<TError>

      a resolver to delegate resolution to

    • Optional _options: {
          deserializeManifestOptions?: DeserializeManifestOptions;
      }

      control wrapper manifest deserialization

      • Optional deserializeManifestOptions?: DeserializeManifestOptions

    Returns PackageToWrapperResolver<TError>

Properties

_innerResolver: any
_options?: any

Methods

  • Resolve a URI to a wrap package, a wrapper, or a URI. If successful, cache the result.

    Parameters

    • uri: Uri

      the URI to resolve

    • client: CoreClient

      a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface

    • resolutionContext: IUriResolutionContext

      the current URI resolution context

    Returns Promise<Result<UriPackageOrWrapper, Error | TError>>

    A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful

  • Creates a PackageToWrapperResolver from a resolver-like object

    Type Parameters

    • TResolverError = unknown

    Parameters

    • innerResolver: UriResolverLike

      a resolver-like item to delegate resolution to

    • Optional options: {
          deserializeManifestOptions?: DeserializeManifestOptions;
      }

      control wrapper manifest deserialization

      • Optional deserializeManifestOptions?: DeserializeManifestOptions

    Returns PackageToWrapperResolver<TResolverError>

    a PackageToWrapperResolver

Generated using TypeDoc