Archived
Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 (#6516)
* Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 * fix tests
This commit is contained in:
Vendored
+38
-35
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Electron 4.2.5
|
||||
// Type definitions for Electron 4.2.7
|
||||
// Project: http://electronjs.org/
|
||||
// Definitions by: The Electron Team <https://github.com/electron/electron>
|
||||
// Definitions: https://github.com/electron/electron-typescript-definitions
|
||||
@@ -3479,14 +3479,14 @@ declare namespace Electron {
|
||||
* Creates a new NativeImage instance from the NSImage that maps to the given image
|
||||
* name. See NSImageName for a list of possible values. The hslShift is applied to
|
||||
* the image with the following rules This means that [-1, 0, 1] will make the
|
||||
* image completely white and [-1, 1, 0] will make the image completely black. In
|
||||
* some cases, the NSImageName doesn't match its string representation; one example
|
||||
* of this is NSFolderImageName, whose string representation would actually be
|
||||
* NSFolder. Therefore, you'll need to determine the correct string representation
|
||||
* for your image before passing it in. This can be done with the following: echo
|
||||
* -e '#import <Cocoa/Cocoa.h>\nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); }' |
|
||||
* clang -otest -x objective-c -framework Cocoa - && ./test where SYSTEM_IMAGE_NAME
|
||||
* should be replaced with any value from this list.
|
||||
* image completely white and [-1, 1, 0] will make the image completely black. In
|
||||
* some cases, the NSImageName doesn't match its string representation; one example
|
||||
* of this is NSFolderImageName, whose string representation would actually be
|
||||
* NSFolder. Therefore, you'll need to determine the correct string representation
|
||||
* for your image before passing it in. This can be done with the following: echo
|
||||
* -e '#import <Cocoa/Cocoa.h>\nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME); }' |
|
||||
* clang -otest -x objective-c -framework Cocoa - && ./test where SYSTEM_IMAGE_NAME
|
||||
* should be replaced with any value from this list.
|
||||
*/
|
||||
static createFromNamedImage(imageName: string, hslShift: number[]): NativeImage;
|
||||
/**
|
||||
@@ -3737,6 +3737,17 @@ declare namespace Electron {
|
||||
once(event: 'unlock-screen', listener: Function): this;
|
||||
addListener(event: 'unlock-screen', listener: Function): this;
|
||||
removeListener(event: 'unlock-screen', listener: Function): this;
|
||||
/**
|
||||
* Calculate the system idle state. idleThreshold is the amount of time (in
|
||||
* seconds) before considered idle. callback will be called synchronously on some
|
||||
* systems and with an idleState argument that describes the system's state. locked
|
||||
* is available on supported systems only.
|
||||
*/
|
||||
querySystemIdleState(idleThreshold: number, callback: (idleState: 'active' | 'idle' | 'locked' | 'unknown') => void): void;
|
||||
/**
|
||||
* Calculate system idle time in seconds.
|
||||
*/
|
||||
querySystemIdleTime(callback: (idleTime: number) => void): void;
|
||||
}
|
||||
|
||||
interface PowerSaveBlocker extends EventEmitter {
|
||||
@@ -4418,30 +4429,6 @@ declare namespace Electron {
|
||||
* The new RGBA color the user assigned to be their system accent color.
|
||||
*/
|
||||
newColor: string) => void): this;
|
||||
/**
|
||||
* NOTE: This event is only emitted after you have called
|
||||
* startAppLevelAppearanceTrackingOS
|
||||
*/
|
||||
on(event: 'appearance-changed', listener: (
|
||||
/**
|
||||
* Can be `dark` or `light`
|
||||
*/
|
||||
newAppearance: ('dark' | 'light')) => void): this;
|
||||
once(event: 'appearance-changed', listener: (
|
||||
/**
|
||||
* Can be `dark` or `light`
|
||||
*/
|
||||
newAppearance: ('dark' | 'light')) => void): this;
|
||||
addListener(event: 'appearance-changed', listener: (
|
||||
/**
|
||||
* Can be `dark` or `light`
|
||||
*/
|
||||
newAppearance: ('dark' | 'light')) => void): this;
|
||||
removeListener(event: 'appearance-changed', listener: (
|
||||
/**
|
||||
* Can be `dark` or `light`
|
||||
*/
|
||||
newAppearance: ('dark' | 'light')) => void): this;
|
||||
on(event: 'color-changed', listener: (event: Event) => void): this;
|
||||
once(event: 'color-changed', listener: (event: Event) => void): this;
|
||||
addListener(event: 'color-changed', listener: (event: Event) => void): this;
|
||||
@@ -8789,17 +8776,33 @@ declare namespace Electron {
|
||||
* The type of media access being requested, can be video, audio or unknown
|
||||
*/
|
||||
mediaType: ('video' | 'audio' | 'unknown');
|
||||
/**
|
||||
* The last URL the requesting frame loaded
|
||||
*/
|
||||
requestingUrl: string;
|
||||
/**
|
||||
* Whether the frame making the request is the main frame
|
||||
*/
|
||||
isMainFrame: boolean;
|
||||
}
|
||||
|
||||
interface PermissionRequestHandlerDetails {
|
||||
/**
|
||||
* The url of the openExternal request.
|
||||
*/
|
||||
externalURL: string;
|
||||
externalURL?: string;
|
||||
/**
|
||||
* The types of media access being requested, elements can be video or audio
|
||||
*/
|
||||
mediaTypes: Array<'video' | 'audio'>;
|
||||
mediaTypes?: Array<'video' | 'audio'>;
|
||||
/**
|
||||
* The last URL the requesting frame loaded
|
||||
*/
|
||||
requestingUrl: string;
|
||||
/**
|
||||
* Whether the frame making the request is the main frame
|
||||
*/
|
||||
isMainFrame: boolean;
|
||||
}
|
||||
|
||||
interface PluginCrashedEvent extends Event {
|
||||
|
||||
Vendored
+42
-11
@@ -15,6 +15,11 @@ declare module 'xterm' {
|
||||
*/
|
||||
export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
||||
|
||||
/**
|
||||
* A string representing log level.
|
||||
*/
|
||||
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'off';
|
||||
|
||||
/**
|
||||
* A string representing a renderer type.
|
||||
*/
|
||||
@@ -107,6 +112,18 @@ declare module 'xterm' {
|
||||
*/
|
||||
lineHeight?: number;
|
||||
|
||||
/**
|
||||
* What log level to use, this will log for all levels below and including
|
||||
* what is set:
|
||||
*
|
||||
* 1. debug
|
||||
* 2. info (default)
|
||||
* 3. warn
|
||||
* 4. error
|
||||
* 5. off
|
||||
*/
|
||||
logLevel?: LogLevel;
|
||||
|
||||
/**
|
||||
* Whether to treat option as the meta key.
|
||||
*/
|
||||
@@ -177,6 +194,12 @@ declare module 'xterm' {
|
||||
* not whitespace.
|
||||
*/
|
||||
windowsMode?: boolean;
|
||||
|
||||
/**
|
||||
* A string containing all characters that are considered word separated by the
|
||||
* double click to select work logic.
|
||||
*/
|
||||
wordSeparator?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,7 +214,7 @@ declare module 'xterm' {
|
||||
cursor?: string,
|
||||
/** The accent color of the cursor (fg color for a block cursor) */
|
||||
cursorAccent?: string,
|
||||
/** The selection color (can be transparent) */
|
||||
/** The selection background color (can be transparent) */
|
||||
selection?: string,
|
||||
/** ANSI black (eg. `\x1b[30m`) */
|
||||
black?: string,
|
||||
@@ -483,12 +506,14 @@ declare module 'xterm' {
|
||||
* final character (e.g "m" for SGR) of the CSI sequence.
|
||||
* @param callback The function to handle the escape sequence. The callback
|
||||
* is called with the numerical params, as well as the special characters
|
||||
* (e.g. "$" for DECSCPP). Return true if the sequence was handled; false if
|
||||
* (e.g. "$" for DECSCPP). If the sequence has subparams the array will
|
||||
* contain subarrays with their numercial values.
|
||||
* Return true if the sequence was handled; false if
|
||||
* we should try a previous handler (set by addCsiHandler or setCsiHandler).
|
||||
* The most recently-added handler is tried first.
|
||||
* @return An IDisposable you can call to remove this handler.
|
||||
*/
|
||||
addCsiHandler(flag: string, callback: (params: number[], collect: string) => boolean): IDisposable;
|
||||
addCsiHandler(flag: string, callback: (params: (number | number[])[], collect: string) => boolean): IDisposable;
|
||||
|
||||
/**
|
||||
* (EXPERIMENTAL) Adds a handler for OSC escape sequences.
|
||||
@@ -668,12 +693,12 @@ declare module 'xterm' {
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param key The option key.
|
||||
*/
|
||||
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'rendererType' | 'termName'): string;
|
||||
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string;
|
||||
/**
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param key The option key.
|
||||
*/
|
||||
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean;
|
||||
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean;
|
||||
/**
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param key The option key.
|
||||
@@ -700,13 +725,19 @@ declare module 'xterm' {
|
||||
* @param key The option key.
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'fontFamily' | 'termName' | 'bellSound', value: string): void;
|
||||
setOption(key: 'fontFamily' | 'termName' | 'bellSound' | 'wordSeparator', value: string): void;
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param key The option key.
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'fontWeight' | 'fontWeightBold', value: null | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'): void;
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param key The option key.
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'logLevel', value: LogLevel): void;
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param key The option key.
|
||||
@@ -724,7 +755,7 @@ declare module 'xterm' {
|
||||
* @param key The option key.
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void;
|
||||
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void;
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param key The option key.
|
||||
@@ -928,16 +959,16 @@ declare module 'xterm' {
|
||||
// Modifications to official .d.ts below
|
||||
declare module 'xterm' {
|
||||
interface TerminalCore {
|
||||
debug: boolean;
|
||||
|
||||
handler(text: string): void;
|
||||
|
||||
_onScroll: IEventEmitter<number>;
|
||||
_onKey: IEventEmitter<{ key: string }>;
|
||||
|
||||
_charSizeService: {
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
|
||||
_coreService: {
|
||||
triggerDataEvent(data: string, wasUserInput?: boolean): void;
|
||||
}
|
||||
|
||||
_renderService: {
|
||||
|
||||
Reference in New Issue
Block a user