💄 bootstrap types
This commit is contained in:
parent
970f799890
commit
8a4d271f43
7 changed files with 20 additions and 9 deletions
11
src/bootstrap-window.js
vendored
11
src/bootstrap-window.js
vendored
|
@ -32,8 +32,15 @@
|
|||
|
||||
/**
|
||||
* @param {string[]} modulePaths
|
||||
* @param {(result: unknown, configuration: object) => Promise<unknown> | undefined} resultCallback
|
||||
* @param {{ forceEnableDeveloperKeybindings?: boolean, disallowReloadKeybinding?: boolean, removeDeveloperKeybindingsAfterLoad?: boolean, canModifyDOM?: (config: object) => void, beforeLoaderConfig?: (config: object, loaderConfig: object) => void, beforeRequire?: () => void }=} options
|
||||
* @param {(result: unknown, configuration: import('./vs/base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration) => Promise<unknown> | undefined} resultCallback
|
||||
* @param {{
|
||||
* forceEnableDeveloperKeybindings?: boolean,
|
||||
* disallowReloadKeybinding?: boolean,
|
||||
* removeDeveloperKeybindingsAfterLoad?: boolean,
|
||||
* canModifyDOM?: (config: import('./vs/base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration) => void,
|
||||
* beforeLoaderConfig?: (config: import('./vs/base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration, loaderConfig: object) => void,
|
||||
* beforeRequire?: () => void
|
||||
* }} options
|
||||
*/
|
||||
async function load(modulePaths, resultCallback, options) {
|
||||
performance.mark('code/willWaitForWindowConfig');
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @returns {{ load: (modules: string[], resultCallback: (result, configuration: object) => unknown, options?: object) => unknown }}
|
||||
* @returns {{
|
||||
* load: (modules: string[], resultCallback: (result, configuration: import('../../../base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration) => unknown) => unknown
|
||||
* }}
|
||||
*/
|
||||
function bootstrapWindowLib() {
|
||||
// @ts-ignore (defined in bootstrap-window.js)
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
/**
|
||||
* @returns {{
|
||||
* load: (modules: string[], resultCallback: (result, configuration: import('../../../platform/windows/common/windows').INativeWindowConfiguration) => unknown, options: object) => unknown,
|
||||
* globals: () => typeof import('../../../base/parts/sandbox/electron-sandbox/globals')
|
||||
* }}
|
||||
*/
|
||||
function bootstrapWindowLib() {
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
}, { forceEnableDeveloperKeybindings: true, disallowReloadKeybinding: true });
|
||||
|
||||
/**
|
||||
* @returns {{ load: (modules: string[], resultCallback: (result, configuration: object) => unknown, options?: object) => unknown }}
|
||||
* @returns {{
|
||||
* load: (modules: string[], resultCallback: (result, configuration: import('../../../base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration) => unknown, options?: { forceEnableDeveloperKeybindings?: boolean, disallowReloadKeybinding?: boolean }) => unknown
|
||||
* }}
|
||||
*/
|
||||
function bootstrapWindowLib() {
|
||||
// @ts-ignore (defined in bootstrap-window.js)
|
||||
|
|
|
@ -11,11 +11,13 @@
|
|||
|
||||
// Load process explorer into window
|
||||
bootstrapWindow.load(['vs/code/electron-sandbox/processExplorer/processExplorerMain'], function (processExplorer, configuration) {
|
||||
processExplorer.startup(configuration.windowId, configuration.data);
|
||||
processExplorer.startup(configuration);
|
||||
}, { forceEnableDeveloperKeybindings: true });
|
||||
|
||||
/**
|
||||
* @returns {{ load: (modules: string[], resultCallback: (result, configuration: object) => unknown, options?: object) => unknown }}
|
||||
* @returns {{
|
||||
* load: (modules: string[], resultCallback: (result, configuration: import('../../../base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration) => unknown, options?: { forceEnableDeveloperKeybindings?: boolean }) => unknown
|
||||
* }}
|
||||
*/
|
||||
function bootstrapWindowLib() {
|
||||
// @ts-ignore (defined in bootstrap-window.js)
|
||||
|
|
|
@ -483,7 +483,7 @@ class ProcessExplorer {
|
|||
}
|
||||
}
|
||||
|
||||
export function startup(windowId: number, data: ProcessExplorerData): void {
|
||||
export function startup({ windowId, data }: { windowId: number, data: ProcessExplorerData }): void {
|
||||
const platformClass = data.platform === 'win32' ? 'windows' : data.platform === 'linux' ? 'linux' : 'mac';
|
||||
document.body.classList.add(platformClass); // used by our fonts
|
||||
applyZoom(data.zoomLevel);
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
/**
|
||||
* @returns {{
|
||||
* load: (modules: string[], resultCallback: (result, configuration: import('../../../platform/windows/common/windows').INativeWindowConfiguration) => unknown, options: object) => unknown,
|
||||
* globals: () => typeof import('../../../base/parts/sandbox/electron-sandbox/globals')
|
||||
* }}
|
||||
*/
|
||||
function bootstrapWindowLib() {
|
||||
|
|
Loading…
Reference in a new issue