Permalink
Switch branches/tags
1.11 aeschli/bundled-app-insights aeschli/json-tests aeschli/tokenizersupport-initialization alex/binary-rpc alex/snapshot2 alex/35225 alexr00/problemMatcher alexr00/rerunTask alexr00/terminalReuseOrdering avoid-fssync ben/build-macos build-using-ts-3.0 chines-locale chrmarti/cloudshellts chrmarti/embeddedEditorBackground chrmarti/quickinputapi chrmarti/quickinputapioptions chrmarti/quickinputapiwip chrmarti/vsc-proxy chrmarti/51986 chrmarti/57850 chrmarti/59343 chrmarti/60243 chrmarti/62716 core-lang css-json-shrinkwrap dbaeumer/47386 dbaeumer/48032 dbaeumer/50588 dbaeumer/50799 dbaeumer/54111 dbaeumer/56721 dbaeumer/57148 dbaeumer/61543 dockfind electron-3.0.x electron-4.0.x err-telemetry error file-ext-tag-telemetry fix-64613 fix-indent fix-menu-leak for-christof hackathon/profile implementation-progress isidorn/buildTest isidorn/debugLogging isidorn/debugTopLevelMenuIssue isidorn/lazyFormatter isidorn/loadedScriptSchedulers isidorn/normalizePaths isidorn/openEditorsContext isidorn/replDynamicHeight isidorn/resourceTrimTrailingSlash isidorn/taskActiveEvent isidorn/treeNavigationKeyboard isidorn/zenModeRestore joao/build joao/clean-deps joao/compile-es6 joao/darwin-executable-name joao/data-tree-model joao/git-api joao/inno-signtool joao/ipc-cancellation joao/ipc-rpc joao/keyvault joao/linux-integration-tests joao/list-dnd joao/list-selectable-rows joao/log-path joao/next joao/outline joao/tree-filter joao/tree joao/uninstaller joao/wip-tree joaomoreno-patch-1 joh/brackets joh/fix59538 joh/fix/64829 joh/leak joh/log-appender joh/next joh/outline joh/perf-canary joh/search-cancel joh/webpack-json kieferrm/errortel kieferrm/mainDebug kieferrm/terminal-cwd master misolori/a11y-themes misolori/activity-bar-update misolori/light-theme-icons-selection-dont-work misolori/light-theme-icons misolori/open-change-icons misolori/seti-update misolori/welcome-screen-keys mjbvz/fix-60315 mjbvz/remove-std-fork mjbvz/trigger-context octref/contributing octref/web-component octref/58555 optout-locale php-html-enter-rules prompt-lang-pack ramyar/copy-suggest-docs ramyar/reload-subtext ramyar/suggest-no-icons rebornix/ESM rebornix/FastTokenization rebornix/commentsgrouping rebornix/nativeWordOperation rebornix/review rebornix/search-in-parallel release/1.14 release/1.15 release/1.16 release/1.17 release/1.18 release/1.19 release/1.20 release/1.21 release/1.22 release/1.23 release/1.24 release/1.25 release/1.26 release/1.27 release/1.28 release/1.29 release/1.30 reuse-focuseditem revert-52782-electron-2.0.x revert-54854-revert-52782-electron-2.0.x rmacfarlane/debug-process rmacfarlane/delete-comments rmacfarlane/unsupported roblou/cachedSearchProvider roblou/caseInsensitiveGlobs roblou/ehSearch roblou/fileSearchChanges roblou/fileTextSearchSep roblou/findFilesUri roblou/promoteExtLogAPI roblou/searchAPIchanges roblou/settingsEditorAsTree roblou/settingsSearchIdChanges sandy081/fix62411 sandy081/openUri sandy081/treeItemDecorations sandy081/vnext sandy081/54315 sandy081/54746 sandy081/55879 sandy081/59603 settings-contrib settings-polish show-english standalone/0.1.x standalone/0.1.1 standalone/0.6.x standalone/0.7.x standalone/0.8.x standalone/0.10.x standalone/0.11.x standalone/0.12.x standalone/0.13.x standalone/0.14.x standalone/0.15.x triggerExpansionOnTab tsalinger/multipath-handling-quoted-backslash-in-linux tsalinger/multipath-reveal-children tyriar/conpty tyriar/dom_render tyriar/electron-1.8.2 tyriar/snap tyriar/term_ligatures tyriar/term_ligatures2 tyriar/term_tele tyriar/54093_buffering umd update-event win32-ia32-builds win32-sign
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (40 sloc) 1.83 KB
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// Interfaces for WinJS
export type ErrorCallback = (error: any) => void;
export class Promise<T = any> {
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason: any) => void) => void);
public then<TResult1 = T, TResult2 = never>(
onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
public static as(value: null): Promise<null>;
public static as(value: undefined): Promise<undefined>;
public static as<T>(value: PromiseLike<T>): PromiseLike<T>;
public static as<T, SomePromise extends PromiseLike<T>>(value: SomePromise): SomePromise;
public static as<T>(value: T): Promise<T>;
public static join<T1, T2>(promises: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
public static join<T>(promises: (T | PromiseLike<T>)[]): Promise<T[]>;
public static wrap<T>(value: T | PromiseLike<T>): Promise<T>;
public static wrapError<T = never>(error: Error): Promise<T>;
/**
* @internal
*/
public static addEventListener(event: 'error', promiseErrorHandler: (e: IPromiseError) => void): void;
}
export type TValueCallback<T = any> = (value: T | PromiseLike<T>) => void;
export {
Promise as TPromise,
TValueCallback as ValueCallback
};
export interface IPromiseErrorDetail {
parent: Promise;
error: any;
id: number;
handler: Function;
exception: Error;
}
export interface IPromiseError {
detail: IPromiseErrorDetail;
}