UNPKG

makecode-core

Version:

MakeCode (PXT) - web-cached build tool

63 lines (62 loc) 1.72 kB
import * as mkc from "./mkc"; export interface HttpRequestOptions { url: string; method?: string; data?: any; headers?: pxt.Map<string>; allowHttpErrors?: boolean; allowGzipPost?: boolean; } export interface HttpResponse { statusCode: number; headers: pxt.Map<string | string[]>; buffer?: any; text?: string; json?: any; } export declare function requestAsync(options: HttpRequestOptions): Promise<HttpResponse>; export declare function httpGetTextAsync(url: string): Promise<string>; export declare function httpGetJsonAsync(url: string): Promise<any>; export interface WebConfig { relprefix: string; workerjs: string; monacoworkerjs: string; gifworkerjs: string; pxtVersion: string; pxtRelId: string; pxtCdnUrl: string; commitCdnUrl: string; blobCdnUrl: string; cdnUrl: string; targetUrl: string; targetVersion: string; targetRelId: string; targetId: string; simUrl: string; partsUrl?: string; runUrl?: string; docsUrl?: string; isStatic?: boolean; verprefix?: string; rootUrl: string; manifestUrl?: string; files: { [index: string]: string; }; } export interface DownloadInfo { manifestUrl?: string; manifest?: string; manifestEtag?: string; cdnUrl?: string; simKey?: string; assetEditorKey?: string; versionNumber?: number; updateCheckedAt?: number; webConfig?: WebConfig; targetVersion?: string; targetConfig?: any; cachedAssetEditorKey?: string; cachedSimulatorKey?: string; } export declare function downloadAsync(cache: mkc.Cache, webAppUrl: string, forceCheckUpdates?: boolean): Promise<mkc.DownloadedEditor>;