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​

ConstructorAlertsDescription
(constructor)()BetaConstructs a new instance of the LocalResolver class

Methods​

MethodAlertsReturn TypeDescription
createCreateNewRequest(documentId)BetaIRequest
getAbsoluteUrl(resolvedUrl, relativeUrl)BetaPromise<string>
resolve(request)BetaPromise<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​

ParameterTypeDescription
documentIdstring

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​

ParameterTypeDescription
resolvedUrlIResolvedUrl
relativeUrlstring

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​

ParameterTypeDescription
requestIRequestrequest to handle

Returns​

Return type: Promise<IResolvedUrl>