Skip to main content

LocalResolver Class

Resolves URLs by providing fake URLs which succeed with the other related local classes. \

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/local-driver/legacy.

For more information about our API support guarantees, see here.

Signature

export declare class LocalResolver implements IUrlResolver

Implements: IUrlResolver

Constructors

Constructor Alerts Description
(constructor)() Beta Constructs a new instance of the LocalResolver class

Methods

Method Alerts Return Type Description
createCreateNewRequest(documentId) Beta IRequest
getAbsoluteUrl(resolvedUrl, relativeUrl) Beta Promise<string>
resolve(request) Beta Promise<IResolvedUrl> Resolves URL requests by providing fake URLs with an actually generated token from constant test strings. The root of the URL is fake, but the remaining relative URL can still be parsed.

Constructor Details

(constructor)

Constructs a new instance of the LocalResolver class

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
constructor();

Method Details

createCreateNewRequest

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
createCreateNewRequest(documentId: string): IRequest;

Parameters

Parameter Type Description
documentId string

Returns

Return type: IRequest

getAbsoluteUrl

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string>;

Parameters

Parameter Type Description
resolvedUrl IResolvedUrl
relativeUrl string

Returns

Return type: Promise<string>

resolve

Resolves URL requests by providing fake URLs with an actually generated token from constant test strings. The root of the URL is fake, but the remaining relative URL can still be parsed.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature
resolve(request: IRequest): Promise<IResolvedUrl>;

Parameters

Parameter Type Description
request IRequest request to handle

Returns

Return type: Promise<IResolvedUrl>