mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-21 02:39:14 +00:00
Uses status bar to indicate hot reloading
This commit is contained in:
committed by
Henning Dieterichs
parent
942ed9acd7
commit
22a578f53b
21
scripts/debugger-scripts-api.d.ts
vendored
21
scripts/debugger-scripts-api.d.ts
vendored
@@ -3,20 +3,33 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
type RunFunction = ((debugSession: IDebugSession) => IDisposable) | ((debugSession: IDebugSession) => Promise<IDisposable>);
|
||||
type RunFunction =
|
||||
| ((debugSession: IDebugSession, context: Context) => IDisposable)
|
||||
| ((debugSession: IDebugSession, context: Context) => Promise<IDisposable>);
|
||||
|
||||
interface IDebugSession {
|
||||
name: string;
|
||||
eval(expression: string): Promise<void>;
|
||||
evalJs<T extends any[]>(bodyFn: (...args: T) => void, ...args: T): Promise<void>;
|
||||
eval(expression: string): Promise<unknown>;
|
||||
evalJs<T extends any[], TResult>(
|
||||
bodyFn: (...args: T) => TResult,
|
||||
...args: T
|
||||
): Promise<TResult>;
|
||||
}
|
||||
|
||||
interface Context {
|
||||
vscode: typeof import('vscode');
|
||||
}
|
||||
|
||||
interface IDisposable {
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
interface HotReloadConfig {
|
||||
mode?: 'patch-prototype' | undefined;
|
||||
}
|
||||
|
||||
interface GlobalThisAddition {
|
||||
$hotReload_applyNewExports?(args: { oldExports: Record<string, unknown>; newSrc: string }): AcceptNewExportsFn | undefined;
|
||||
$hotReload_applyNewExports?(args: { oldExports: Record<string, unknown>; newSrc: string; config?: HotReloadConfig }): AcceptNewExportsFn | undefined;
|
||||
}
|
||||
|
||||
type AcceptNewExportsFn = (newExports: Record<string, unknown>) => boolean;
|
||||
|
||||
Reference in New Issue
Block a user