import { VSBufferReadableStream } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer"; import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service"; export declare namespace WebviewResourceResponse { enum Type { Success = 0, Failed = 1, AccessDenied = 2, NotModified = 3 } class StreamSuccess { readonly stream: VSBufferReadableStream; readonly etag: string | undefined; readonly mtime: number | undefined; readonly mimeType: string; readonly size: number; readonly type = Type.Success; constructor(stream: VSBufferReadableStream, etag: string | undefined, mtime: number | undefined, mimeType: string, size: number); } const Failed: { readonly type: Type.Failed; }; const AccessDenied: { readonly type: Type.AccessDenied; }; class NotModified { readonly mimeType: string; readonly mtime: number | undefined; readonly type = Type.NotModified; constructor(mimeType: string, mtime: number | undefined); } type StreamResponse = StreamSuccess | typeof Failed | typeof AccessDenied | NotModified; } export declare function loadLocalResource(accessor: ServicesAccessor, requestUri: URI, options: { ifNoneMatch: string | undefined; roots: ReadonlyArray; range?: { readonly start: number; readonly end?: number; }; }, token: CancellationToken): Promise; export declare function getResourceToLoad(requestUri: URI, roots: ReadonlyArray, uriIdentityService: IUriIdentityService): URI | undefined;