Skip to content

Commit 99b13b8

Browse files
committed
sandbox - update electron types
1 parent 76b7331 commit 99b13b8

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/vs/base/parts/sandbox/common/electronTypes.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// #######################################################################
88
// ### ###
99
// ### electron.d.ts types we need in a common layer for reuse ###
10-
// ### (copied from Electron 7.x) ###
10+
// ### (copied from Electron 9.x) ###
1111
// ### ###
1212
// #######################################################################
1313

@@ -132,6 +132,7 @@ export interface SaveDialogOptions {
132132
* @platform darwin
133133
*/
134134
showsTagField?: boolean;
135+
properties?: Array<'showHiddenFiles' | 'createDirectory' | 'treatPackageAsDirectory' | 'showOverwriteConfirmation' | 'dontAddToRecent'>;
135136
/**
136137
* Create a security scoped bookmark when packaged for the Mac App Store. If this
137138
* option is enabled and the file doesn't already exist a blank file will be
@@ -155,7 +156,7 @@ export interface OpenDialogOptions {
155156
* Contains which features the dialog should use. The following values are
156157
* supported:
157158
*/
158-
properties?: Array<'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory'>;
159+
properties?: Array<'openFile' | 'openDirectory' | 'multiSelections' | 'showHiddenFiles' | 'createDirectory' | 'promptToCreate' | 'noResolveAliases' | 'treatPackageAsDirectory' | 'dontAddToRecent'>;
159160
/**
160161
* Message to display above input boxes.
161162
*
@@ -222,11 +223,11 @@ export interface InputEvent {
222223
// Docs: http://electronjs.org/docs/api/structures/input-event
223224

224225
/**
225-
* An array of modifiers of the event, can be `shift`, `control`, `alt`, `meta`,
226-
* `isKeypad`, `isAutoRepeat`, `leftButtonDown`, `middleButtonDown`,
227-
* `rightButtonDown`, `capsLock`, `numLock`, `left`, `right`.
226+
* An array of modifiers of the event, can be `shift`, `control`, `ctrl`, `alt`,
227+
* `meta`, `command`, `cmd`, `isKeypad`, `isAutoRepeat`, `leftButtonDown`,
228+
* `middleButtonDown`, `rightButtonDown`, `capsLock`, `numLock`, `left`, `right`.
228229
*/
229-
modifiers: Array<'shift' | 'control' | 'alt' | 'meta' | 'isKeypad' | 'isAutoRepeat' | 'leftButtonDown' | 'middleButtonDown' | 'rightButtonDown' | 'capsLock' | 'numLock' | 'left' | 'right'>;
230+
modifiers?: Array<'shift' | 'control' | 'ctrl' | 'alt' | 'meta' | 'command' | 'cmd' | 'isKeypad' | 'isAutoRepeat' | 'leftButtonDown' | 'middleButtonDown' | 'rightButtonDown' | 'capsLock' | 'numLock' | 'left' | 'right'>;
230231
}
231232

232233
export interface MouseInputEvent extends InputEvent {
@@ -311,6 +312,9 @@ export interface CrashReporterStartOptions {
311312
}
312313

313314
export interface ProcessMemoryInfo {
315+
316+
// Docs: http://electronjs.org/docs/api/structures/process-memory-info
317+
314318
/**
315319
* The amount of memory not shared by other processes, such as JS heap or HTML
316320
* content in Kilobytes.

src/vs/base/parts/sandbox/electron-browser/preload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// #######################################################################
1313
// ### ###
1414
// ### !!! DO NOT USE GET/SET PROPERTIES ANYWHERE HERE !!! ###
15+
// ### !!! UNLESS THE ACCESS IS WITHOUT SIDE EFFECTS !!! ###
1516
// ### (https://github.com/electron/electron/issues/25516) ###
1617
// ### ###
1718
// #######################################################################

0 commit comments

Comments
 (0)