mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
2
src/typings/electron.d.ts
vendored
2
src/typings/electron.d.ts
vendored
@@ -507,7 +507,7 @@ declare namespace Electron {
|
||||
* and macOS, icons depend on the application associated with file mime type.
|
||||
*/
|
||||
getFileIcon(path: string, callback: (error: Error, icon: NativeImage) => void): void;
|
||||
getGpuFeatureStatus(): GPUFeatureStatus;
|
||||
getGPUFeatureStatus(): GPUFeatureStatus;
|
||||
getJumpListSettings(): JumpListSettings;
|
||||
/**
|
||||
* Note: When distributing your packaged app, you have to also ship the locales
|
||||
|
||||
2
src/typings/gc-signals.d.ts
vendored
2
src/typings/gc-signals.d.ts
vendored
@@ -6,7 +6,7 @@ declare module 'gc-signals' {
|
||||
* value is stored for later consumption.
|
||||
*/
|
||||
export const GCSignal: {
|
||||
new (id: number): GCSignal;
|
||||
new(id: number): GCSignal;
|
||||
};
|
||||
/**
|
||||
* Consume ids of garbage collected signals.
|
||||
|
||||
2
src/typings/globals/core-js/index.d.ts
vendored
2
src/typings/globals/core-js/index.d.ts
vendored
@@ -483,7 +483,7 @@ interface SymbolConstructor {
|
||||
* A method that returns the default iterator for an object. Called by the semantics of the
|
||||
* for-of statement.
|
||||
*/
|
||||
iterator: symbol;
|
||||
readonly iterator: symbol;
|
||||
|
||||
/**
|
||||
* A regular expression method that matches the regular expression against a string. Called
|
||||
|
||||
72
src/typings/keytar.d.ts
vendored
72
src/typings/keytar.d.ts
vendored
@@ -5,44 +5,44 @@
|
||||
|
||||
declare module 'keytar' {
|
||||
|
||||
/**
|
||||
* Get the stored password for the service and account.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
*
|
||||
* @returns A promise for the password string.
|
||||
*/
|
||||
export function getPassword(service: string, account: string): Promise<string | null>;
|
||||
/**
|
||||
* Get the stored password for the service and account.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
*
|
||||
* @returns A promise for the password string.
|
||||
*/
|
||||
export function getPassword(service: string, account: string): Promise<string | null>;
|
||||
|
||||
/**
|
||||
* Add the password for the service and account to the keychain.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
* @param password The string password.
|
||||
*
|
||||
* @returns A promise for the set password completion.
|
||||
*/
|
||||
export function setPassword(service: string, account: string, password: string): Promise<void>;
|
||||
/**
|
||||
* Add the password for the service and account to the keychain.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
* @param password The string password.
|
||||
*
|
||||
* @returns A promise for the set password completion.
|
||||
*/
|
||||
export function setPassword(service: string, account: string, password: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Delete the stored password for the service and account.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
*
|
||||
* @returns A promise for the deletion status. True on success.
|
||||
*/
|
||||
export function deletePassword(service: string, account: string): Promise<boolean>;
|
||||
/**
|
||||
* Delete the stored password for the service and account.
|
||||
*
|
||||
* @param service The string service name.
|
||||
* @param account The string account name.
|
||||
*
|
||||
* @returns A promise for the deletion status. True on success.
|
||||
*/
|
||||
export function deletePassword(service: string, account: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* Find a password for the service in the keychain.
|
||||
*
|
||||
* @param service The string service name.
|
||||
*
|
||||
* @returns A promise for the password string.
|
||||
*/
|
||||
export function findPassword(service: string): Promise<string | null>;
|
||||
/**
|
||||
* Find a password for the service in the keychain.
|
||||
*
|
||||
* @param service The string service name.
|
||||
*
|
||||
* @returns A promise for the password string.
|
||||
*/
|
||||
export function findPassword(service: string): Promise<string | null>;
|
||||
|
||||
}
|
||||
300
src/typings/mocha.d.ts
vendored
300
src/typings/mocha.d.ts
vendored
@@ -4,29 +4,29 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface MochaSetupOptions {
|
||||
//milliseconds to wait before considering a test slow
|
||||
slow?: number;
|
||||
//milliseconds to wait before considering a test slow
|
||||
slow?: number;
|
||||
|
||||
// timeout in milliseconds
|
||||
timeout?: number;
|
||||
// timeout in milliseconds
|
||||
timeout?: number;
|
||||
|
||||
// ui name "bdd", "tdd", "exports" etc
|
||||
ui?: string;
|
||||
// ui name "bdd", "tdd", "exports" etc
|
||||
ui?: string;
|
||||
|
||||
//array of accepted globals
|
||||
globals?: any[];
|
||||
//array of accepted globals
|
||||
globals?: any[];
|
||||
|
||||
// reporter instance (function or string), defaults to `mocha.reporters.Spec`
|
||||
reporter?: any;
|
||||
// reporter instance (function or string), defaults to `mocha.reporters.Spec`
|
||||
reporter?: any;
|
||||
|
||||
// bail on the first test failure
|
||||
bail?: boolean;
|
||||
// bail on the first test failure
|
||||
bail?: boolean;
|
||||
|
||||
// ignore global leaks
|
||||
ignoreLeaks?: boolean;
|
||||
// ignore global leaks
|
||||
ignoreLeaks?: boolean;
|
||||
|
||||
// grep string or regexp to filter tests with
|
||||
grep?: any;
|
||||
// grep string or regexp to filter tests with
|
||||
grep?: any;
|
||||
}
|
||||
|
||||
declare var mocha: Mocha;
|
||||
@@ -46,7 +46,7 @@ declare var specify: Mocha.ITestDefinition;
|
||||
declare function run(): void;
|
||||
|
||||
interface MochaDone {
|
||||
(error?: any): any;
|
||||
(error?: any): any;
|
||||
}
|
||||
|
||||
declare function setup(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
|
||||
@@ -63,172 +63,172 @@ declare function afterEach(callback: (this: Mocha.IBeforeAndAfterContext, done:
|
||||
declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
|
||||
|
||||
declare class Mocha {
|
||||
currentTest: Mocha.ITestDefinition;
|
||||
constructor(options?: {
|
||||
grep?: RegExp;
|
||||
ui?: string;
|
||||
reporter?: string;
|
||||
timeout?: number;
|
||||
reporterOptions?: any;
|
||||
slow?: number;
|
||||
bail?: boolean;
|
||||
});
|
||||
currentTest: Mocha.ITestDefinition;
|
||||
constructor(options?: {
|
||||
grep?: RegExp;
|
||||
ui?: string;
|
||||
reporter?: string;
|
||||
timeout?: number;
|
||||
reporterOptions?: any;
|
||||
slow?: number;
|
||||
bail?: boolean;
|
||||
});
|
||||
|
||||
/** Setup mocha with the given options. */
|
||||
setup(options: MochaSetupOptions): Mocha;
|
||||
bail(value?: boolean): Mocha;
|
||||
addFile(file: string): Mocha;
|
||||
/** Sets reporter by name, defaults to "spec". */
|
||||
reporter(name: string): Mocha;
|
||||
/** Sets reporter constructor, defaults to mocha.reporters.Spec. */
|
||||
reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha;
|
||||
ui(value: string): Mocha;
|
||||
grep(value: string): Mocha;
|
||||
grep(value: RegExp): Mocha;
|
||||
invert(): Mocha;
|
||||
ignoreLeaks(value: boolean): Mocha;
|
||||
checkLeaks(): Mocha;
|
||||
/** Setup mocha with the given options. */
|
||||
setup(options: MochaSetupOptions): Mocha;
|
||||
bail(value?: boolean): Mocha;
|
||||
addFile(file: string): Mocha;
|
||||
/** Sets reporter by name, defaults to "spec". */
|
||||
reporter(name: string): Mocha;
|
||||
/** Sets reporter constructor, defaults to mocha.reporters.Spec. */
|
||||
reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha;
|
||||
ui(value: string): Mocha;
|
||||
grep(value: string): Mocha;
|
||||
grep(value: RegExp): Mocha;
|
||||
invert(): Mocha;
|
||||
ignoreLeaks(value: boolean): Mocha;
|
||||
checkLeaks(): Mocha;
|
||||
/**
|
||||
* Function to allow assertion libraries to throw errors directly into mocha.
|
||||
* This is useful when running tests in a browser because window.onerror will
|
||||
* only receive the 'message' attribute of the Error.
|
||||
*/
|
||||
throwError(error: Error): void;
|
||||
/** Enables growl support. */
|
||||
growl(): Mocha;
|
||||
globals(value: string): Mocha;
|
||||
globals(values: string[]): Mocha;
|
||||
useColors(value: boolean): Mocha;
|
||||
useInlineDiffs(value: boolean): Mocha;
|
||||
timeout(value: number): Mocha;
|
||||
slow(value: number): Mocha;
|
||||
enableTimeouts(value: boolean): Mocha;
|
||||
asyncOnly(value: boolean): Mocha;
|
||||
noHighlighting(value: boolean): Mocha;
|
||||
/** Runs tests and invokes `onComplete()` when finished. */
|
||||
run(onComplete?: (failures: number) => void): Mocha.IRunner;
|
||||
throwError(error: Error): void;
|
||||
/** Enables growl support. */
|
||||
growl(): Mocha;
|
||||
globals(value: string): Mocha;
|
||||
globals(values: string[]): Mocha;
|
||||
useColors(value: boolean): Mocha;
|
||||
useInlineDiffs(value: boolean): Mocha;
|
||||
timeout(value: number): Mocha;
|
||||
slow(value: number): Mocha;
|
||||
enableTimeouts(value: boolean): Mocha;
|
||||
asyncOnly(value: boolean): Mocha;
|
||||
noHighlighting(value: boolean): Mocha;
|
||||
/** Runs tests and invokes `onComplete()` when finished. */
|
||||
run(onComplete?: (failures: number) => void): Mocha.IRunner;
|
||||
}
|
||||
|
||||
// merge the Mocha class declaration with a module
|
||||
declare namespace Mocha {
|
||||
interface ISuiteCallbackContext {
|
||||
timeout(ms: number): this;
|
||||
retries(n: number): this;
|
||||
slow(ms: number): this;
|
||||
}
|
||||
interface ISuiteCallbackContext {
|
||||
timeout(ms: number): this;
|
||||
retries(n: number): this;
|
||||
slow(ms: number): this;
|
||||
}
|
||||
|
||||
interface IHookCallbackContext {
|
||||
skip(): this;
|
||||
timeout(ms: number): this;
|
||||
[index: string]: any;
|
||||
}
|
||||
interface IHookCallbackContext {
|
||||
skip(): this;
|
||||
timeout(ms: number): this;
|
||||
[index: string]: any;
|
||||
}
|
||||
|
||||
|
||||
interface ITestCallbackContext {
|
||||
skip(): this;
|
||||
timeout(ms: number): this;
|
||||
retries(n: number): this;
|
||||
slow(ms: number): this;
|
||||
[index: string]: any;
|
||||
}
|
||||
interface ITestCallbackContext {
|
||||
skip(): this;
|
||||
timeout(ms: number): this;
|
||||
retries(n: number): this;
|
||||
slow(ms: number): this;
|
||||
[index: string]: any;
|
||||
}
|
||||
|
||||
/** Partial interface for Mocha's `Runnable` class. */
|
||||
interface IRunnable {
|
||||
title: string;
|
||||
fn: Function;
|
||||
async: boolean;
|
||||
sync: boolean;
|
||||
timedOut: boolean;
|
||||
timeout(n: number): this;
|
||||
}
|
||||
/** Partial interface for Mocha's `Runnable` class. */
|
||||
interface IRunnable {
|
||||
title: string;
|
||||
fn: Function;
|
||||
async: boolean;
|
||||
sync: boolean;
|
||||
timedOut: boolean;
|
||||
timeout(n: number): this;
|
||||
}
|
||||
|
||||
/** Partial interface for Mocha's `Suite` class. */
|
||||
interface ISuite {
|
||||
parent: ISuite;
|
||||
title: string;
|
||||
/** Partial interface for Mocha's `Suite` class. */
|
||||
interface ISuite {
|
||||
parent: ISuite;
|
||||
title: string;
|
||||
|
||||
fullTitle(): string;
|
||||
}
|
||||
fullTitle(): string;
|
||||
}
|
||||
|
||||
/** Partial interface for Mocha's `Test` class. */
|
||||
interface ITest extends IRunnable {
|
||||
parent: ISuite;
|
||||
pending: boolean;
|
||||
state: 'failed'|'passed'|undefined;
|
||||
/** Partial interface for Mocha's `Test` class. */
|
||||
interface ITest extends IRunnable {
|
||||
parent: ISuite;
|
||||
pending: boolean;
|
||||
state: 'failed' | 'passed' | undefined;
|
||||
|
||||
fullTitle(): string;
|
||||
}
|
||||
fullTitle(): string;
|
||||
}
|
||||
|
||||
interface IBeforeAndAfterContext extends IHookCallbackContext {
|
||||
currentTest: ITest;
|
||||
}
|
||||
interface IBeforeAndAfterContext extends IHookCallbackContext {
|
||||
currentTest: ITest;
|
||||
}
|
||||
|
||||
|
||||
/** Partial interface for Mocha's `Runner` class. */
|
||||
interface IRunner { }
|
||||
/** Partial interface for Mocha's `Runner` class. */
|
||||
interface IRunner { }
|
||||
|
||||
interface IContextDefinition {
|
||||
(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
|
||||
only(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
|
||||
skip(description: string, callback: (this: ISuiteCallbackContext) => void): void;
|
||||
timeout(ms: number): void;
|
||||
}
|
||||
interface IContextDefinition {
|
||||
(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
|
||||
only(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite;
|
||||
skip(description: string, callback: (this: ISuiteCallbackContext) => void): void;
|
||||
timeout(ms: number): void;
|
||||
}
|
||||
|
||||
interface ITestDefinition {
|
||||
(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
|
||||
only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
|
||||
skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): void;
|
||||
timeout(ms: number): void;
|
||||
state: "failed" | "passed";
|
||||
}
|
||||
interface ITestDefinition {
|
||||
(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
|
||||
only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest;
|
||||
skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): void;
|
||||
timeout(ms: number): void;
|
||||
state: "failed" | "passed";
|
||||
}
|
||||
|
||||
export module reporters {
|
||||
export class Base {
|
||||
stats: {
|
||||
suites: number;
|
||||
tests: number;
|
||||
passes: number;
|
||||
pending: number;
|
||||
failures: number;
|
||||
};
|
||||
export module reporters {
|
||||
export class Base {
|
||||
stats: {
|
||||
suites: number;
|
||||
tests: number;
|
||||
passes: number;
|
||||
pending: number;
|
||||
failures: number;
|
||||
};
|
||||
|
||||
constructor(runner: IRunner);
|
||||
}
|
||||
constructor(runner: IRunner);
|
||||
}
|
||||
|
||||
export class Doc extends Base { }
|
||||
export class Dot extends Base { }
|
||||
export class HTML extends Base { }
|
||||
export class HTMLCov extends Base { }
|
||||
export class JSON extends Base { }
|
||||
export class JSONCov extends Base { }
|
||||
export class JSONStream extends Base { }
|
||||
export class Landing extends Base { }
|
||||
export class List extends Base { }
|
||||
export class Markdown extends Base { }
|
||||
export class Min extends Base { }
|
||||
export class Nyan extends Base { }
|
||||
export class Progress extends Base {
|
||||
export class Doc extends Base { }
|
||||
export class Dot extends Base { }
|
||||
export class HTML extends Base { }
|
||||
export class HTMLCov extends Base { }
|
||||
export class JSON extends Base { }
|
||||
export class JSONCov extends Base { }
|
||||
export class JSONStream extends Base { }
|
||||
export class Landing extends Base { }
|
||||
export class List extends Base { }
|
||||
export class Markdown extends Base { }
|
||||
export class Min extends Base { }
|
||||
export class Nyan extends Base { }
|
||||
export class Progress extends Base {
|
||||
/**
|
||||
* @param options.open String used to indicate the start of the progress bar.
|
||||
* @param options.complete String used to indicate a complete test on the progress bar.
|
||||
* @param options.incomplete String used to indicate an incomplete test on the progress bar.
|
||||
* @param options.close String used to indicate the end of the progress bar.
|
||||
*/
|
||||
constructor(runner: IRunner, options?: {
|
||||
open?: string;
|
||||
complete?: string;
|
||||
incomplete?: string;
|
||||
close?: string;
|
||||
});
|
||||
}
|
||||
export class Spec extends Base { }
|
||||
export class TAP extends Base { }
|
||||
export class XUnit extends Base {
|
||||
constructor(runner: IRunner, options?: any);
|
||||
}
|
||||
}
|
||||
constructor(runner: IRunner, options?: {
|
||||
open?: string;
|
||||
complete?: string;
|
||||
incomplete?: string;
|
||||
close?: string;
|
||||
});
|
||||
}
|
||||
export class Spec extends Base { }
|
||||
export class TAP extends Base { }
|
||||
export class XUnit extends Base {
|
||||
constructor(runner: IRunner, options?: any);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare module "mocha" {
|
||||
export = Mocha;
|
||||
export = Mocha;
|
||||
}
|
||||
100
src/typings/node-pty.d.ts
vendored
100
src/typings/node-pty.d.ts
vendored
@@ -1,27 +1,81 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Copyright (c) 2017, Daniel Imms (MIT License).
|
||||
*/
|
||||
|
||||
declare module 'node-pty' {
|
||||
export function fork(file: string, args: string[], options: any): Terminal;
|
||||
export function spawn(file: string, args: string[], options: any): Terminal;
|
||||
export function createTerminal(file: string, args: string[], options: any): Terminal;
|
||||
/**
|
||||
* Forks a process as a pseudoterminal.
|
||||
* @param file The file to launch.
|
||||
* @param args The file's arguments as argv (string[]) or in a pre-escaped CommandLine format
|
||||
* (string). Note that the CommandLine option is only available on Windows and is expected to be
|
||||
* escaped properly.
|
||||
* @param options The options of the terminal.
|
||||
* @see CommandLineToArgvW https://msdn.microsoft.com/en-us/library/windows/desktop/bb776391(v=vs.85).aspx
|
||||
* @see Parsing C++ Comamnd-Line Arguments https://msdn.microsoft.com/en-us/library/17w5ykft.aspx
|
||||
* @see GetCommandLine https://msdn.microsoft.com/en-us/library/windows/desktop/ms683156.aspx
|
||||
*/
|
||||
export function spawn(file: string, args: string[] | string, options: IPtyForkOptions): IPty;
|
||||
|
||||
export interface Terminal {
|
||||
pid: number;
|
||||
|
||||
/**
|
||||
* The title of the active process.
|
||||
*/
|
||||
process: string;
|
||||
|
||||
on(event: string, callback: (data: any) => void): void;
|
||||
|
||||
resize(columns: number, rows: number): void;
|
||||
|
||||
write(data: string): void;
|
||||
|
||||
kill(): void;
|
||||
export interface IPtyForkOptions {
|
||||
name?: string;
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
cwd?: string;
|
||||
env?: { [key: string]: string };
|
||||
uid?: number;
|
||||
gid?: number;
|
||||
encoding?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An interface representing a pseudoterminal, on Windows this is emulated via the winpty library.
|
||||
*/
|
||||
export interface IPty {
|
||||
/**
|
||||
* The process ID of the outer process.
|
||||
*/
|
||||
pid: number;
|
||||
|
||||
/**
|
||||
* The title of the active process.
|
||||
*/
|
||||
process: string;
|
||||
|
||||
/**
|
||||
* Adds a listener to the data event, fired when data is returned from the pty.
|
||||
* @param event The name of the event.
|
||||
* @param listener The callback function.
|
||||
*/
|
||||
on(event: 'data', listener: (data: string) => void): void;
|
||||
|
||||
/**
|
||||
* Adds a listener to the exit event, fired when the pty exits.
|
||||
* @param event The name of the event.
|
||||
* @param listener The callback function, exitCode is the exit code of the process and signal is
|
||||
* the signal that triggered the exit. signal is not supported on Windows.
|
||||
*/
|
||||
on(event: 'exit', listener: (exitCode: number, signal?: number) => void): void;
|
||||
|
||||
/**
|
||||
* Resizes the dimensions of the pty.
|
||||
* @param columns THe number of columns to use.
|
||||
* @param rows The number of rows to use.
|
||||
*/
|
||||
resize(columns: number, rows: number): void;
|
||||
|
||||
/**
|
||||
* Writes data to the pty.
|
||||
* @param data The data to write.
|
||||
*/
|
||||
write(data: string): void;
|
||||
|
||||
/**
|
||||
* Kills the pty.
|
||||
* @param signal The signal to use, defaults to SIGHUP. If the TIOCSIG/TIOCSIGNAL ioctl is not
|
||||
* supported then the process will be killed instead. This parameter is not supported on
|
||||
* Windows.
|
||||
* @throws Will throw when signal is used on Windows.
|
||||
*/
|
||||
kill(signal?: string): void;
|
||||
}
|
||||
}
|
||||
6386
src/typings/node.d.ts
vendored
6386
src/typings/node.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'nsfw' {
|
||||
declare module 'vscode-nsfw' {
|
||||
interface NsfwWatcher {
|
||||
start(): any;
|
||||
stop(): any;
|
||||
17
src/typings/vscode-textmate.d.ts
vendored
17
src/typings/vscode-textmate.d.ts
vendored
@@ -37,12 +37,22 @@ declare module "vscode-textmate" {
|
||||
export interface IEmbeddedLanguagesMap {
|
||||
[scopeName: string]: number;
|
||||
}
|
||||
/**
|
||||
* A map from scope name to a token type.
|
||||
*/
|
||||
export interface ITokenTypeMap {
|
||||
[scopeName: string]: StandardTokenType;
|
||||
}
|
||||
export const enum StandardTokenType {
|
||||
Other = 0,
|
||||
Comment = 1,
|
||||
String = 2,
|
||||
RegEx = 4,
|
||||
}
|
||||
export interface IGrammarConfiguration {
|
||||
embeddedLanguages?: IEmbeddedLanguagesMap;
|
||||
tokenTypes?: ITokenTypeMap;
|
||||
}
|
||||
/**
|
||||
* The registry that will hold all grammars.
|
||||
*/
|
||||
@@ -63,6 +73,11 @@ declare module "vscode-textmate" {
|
||||
* Please do not use language id 0.
|
||||
*/
|
||||
loadGrammarWithEmbeddedLanguages(initialScopeName: string, initialLanguage: number, embeddedLanguages: IEmbeddedLanguagesMap, callback: (err: any, grammar: IGrammar) => void): void;
|
||||
/**
|
||||
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
||||
* Please do not use language id 0.
|
||||
*/
|
||||
loadGrammarWithConfiguration(initialScopeName: string, initialLanguage: number, configuration: IGrammarConfiguration, callback: (err: any, grammar: IGrammar) => void): void;
|
||||
/**
|
||||
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
||||
*/
|
||||
@@ -75,7 +90,7 @@ declare module "vscode-textmate" {
|
||||
/**
|
||||
* Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `loadGrammarFromPathSync`.
|
||||
*/
|
||||
grammarForScopeName(scopeName: string, initialLanguage?: number, embeddedLanguages?: IEmbeddedLanguagesMap): IGrammar;
|
||||
grammarForScopeName(scopeName: string, initialLanguage?: number, embeddedLanguages?: IEmbeddedLanguagesMap, tokenTypes?: ITokenTypeMap): IGrammar;
|
||||
}
|
||||
/**
|
||||
* A grammar
|
||||
|
||||
122
src/typings/vscode-xterm.d.ts
vendored
122
src/typings/vscode-xterm.d.ts
vendored
@@ -17,6 +17,13 @@ declare module 'vscode-xterm' {
|
||||
* An object containing start up options for the terminal.
|
||||
*/
|
||||
export interface ITerminalOptions {
|
||||
/**
|
||||
* Whether background should support non-opaque color. It must be set before
|
||||
* executing open() method and can't be changed later without excuting it again.
|
||||
* Warning: Enabling this option can reduce performances somewhat.
|
||||
*/
|
||||
allowTransparency?: boolean;
|
||||
|
||||
/**
|
||||
* A data uri of the sound to use for the bell (needs bellStyle = 'sound').
|
||||
*/
|
||||
@@ -49,6 +56,8 @@ declare module 'vscode-xterm' {
|
||||
|
||||
/**
|
||||
* Whether to enable the rendering of bold text.
|
||||
*
|
||||
* @deprecated Use fontWeight and fontWeightBold instead.
|
||||
*/
|
||||
enableBold?: boolean;
|
||||
|
||||
@@ -181,8 +190,8 @@ declare module 'vscode-xterm' {
|
||||
matchIndex?: number;
|
||||
|
||||
/**
|
||||
* A callback that validates an individual link, returning true if valid and
|
||||
* false if invalid.
|
||||
* A callback that validates whether to create an individual link, pass
|
||||
* whether the link is valid to the callback.
|
||||
*/
|
||||
validationCallback?: (uri: string, callback: (isValid: boolean) => void) => void;
|
||||
|
||||
@@ -214,29 +223,35 @@ declare module 'vscode-xterm' {
|
||||
}
|
||||
|
||||
export interface IEventEmitter {
|
||||
on(type: string, listener: (...args: any[]) => void): void;
|
||||
off(type: string, listener: (...args: any[]) => void): void;
|
||||
emit(type: string, data?: any): void;
|
||||
addDisposableListener(type: string, handler: (...args: any[]) => void): IDisposable;
|
||||
on(type: string, listener: (...args: any[]) => void): void;
|
||||
off(type: string, listener: (...args: any[]) => void): void;
|
||||
emit(type: string, data?: any): void;
|
||||
addDisposableListener(type: string, handler: (...args: any[]) => void): IDisposable;
|
||||
}
|
||||
|
||||
/**
|
||||
* An object that can be disposed via a dispose function.
|
||||
*/
|
||||
export interface IDisposable {
|
||||
dispose(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface IMarker extends IDisposable {
|
||||
readonly id: number;
|
||||
readonly isDisposed: boolean;
|
||||
readonly line: number;
|
||||
}
|
||||
|
||||
export interface ILocalizableStrings {
|
||||
blankLine: string;
|
||||
promptLabel: string;
|
||||
tooMuchOutput: string;
|
||||
blankLine: string;
|
||||
promptLabel: string;
|
||||
tooMuchOutput: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The class that represents an xterm.js terminal.
|
||||
*/
|
||||
export class Terminal {
|
||||
export class Terminal implements IEventEmitter {
|
||||
/**
|
||||
* The element containing the terminal.
|
||||
*/
|
||||
@@ -257,6 +272,12 @@ declare module 'vscode-xterm' {
|
||||
*/
|
||||
cols: number;
|
||||
|
||||
/**
|
||||
* (EXPERIMENTAL) Get all markers registered against the buffer. If the alt
|
||||
* buffer is active this will always return [].
|
||||
*/
|
||||
markers: IMarker[];
|
||||
|
||||
/**
|
||||
* Natural language strings that can be localized.
|
||||
*/
|
||||
@@ -290,7 +311,7 @@ declare module 'vscode-xterm' {
|
||||
* @param type The type of the event.
|
||||
* @param listener The listener.
|
||||
*/
|
||||
on(type: 'data', listener: (data?: string) => void): void;
|
||||
on(type: 'data', listener: (...args: any[]) => void): void;
|
||||
/**
|
||||
* Registers an event listener.
|
||||
* @param type The type of the event.
|
||||
@@ -308,13 +329,13 @@ declare module 'vscode-xterm' {
|
||||
* @param type The type of the event.
|
||||
* @param listener The listener.
|
||||
*/
|
||||
on(type: 'refresh', listener: (data?: {start: number, end: number}) => void): void;
|
||||
on(type: 'refresh', listener: (data?: { start: number, end: number }) => void): void;
|
||||
/**
|
||||
* Registers an event listener.
|
||||
* @param type The type of the event.
|
||||
* @param listener The listener.
|
||||
*/
|
||||
on(type: 'resize', listener: (data?: {cols: number, rows: number}) => void): void;
|
||||
on(type: 'resize', listener: (data?: { cols: number, rows: number }) => void): void;
|
||||
/**
|
||||
* Registers an event listener.
|
||||
* @param type The type of the event.
|
||||
@@ -341,6 +362,10 @@ declare module 'vscode-xterm' {
|
||||
*/
|
||||
off(type: 'blur' | 'focus' | 'linefeed' | 'selection' | 'data' | 'key' | 'keypress' | 'keydown' | 'refresh' | 'resize' | 'scroll' | 'title' | string, listener: (...args: any[]) => void): void;
|
||||
|
||||
emit(type: string, data?: any): void;
|
||||
|
||||
addDisposableListener(type: string, handler: (...args: any[]) => void): IDisposable;
|
||||
|
||||
/**
|
||||
* Resizes the terminal.
|
||||
* @param x The number of columns to resize to.
|
||||
@@ -383,7 +408,7 @@ declare module 'vscode-xterm' {
|
||||
* @param options Options for the link matcher.
|
||||
* @return The ID of the new matcher, this can be used to deregister.
|
||||
*/
|
||||
registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => boolean | void, options?: ILinkMatcherOptions): number;
|
||||
registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions): number;
|
||||
|
||||
/**
|
||||
* (EXPERIMENTAL) Deregisters a link matcher if it has been registered.
|
||||
@@ -391,6 +416,13 @@ declare module 'vscode-xterm' {
|
||||
*/
|
||||
deregisterLinkMatcher(matcherId: number): void;
|
||||
|
||||
/**
|
||||
* (EXPERIMENTAL) Adds a marker to the normal buffer and returns it. If the
|
||||
* alt buffer is active, undefined is returned.
|
||||
* @param cursorYOffset The y position offset of the marker from the cursor.
|
||||
*/
|
||||
addMarker(cursorYOffset: number): IMarker;
|
||||
|
||||
/**
|
||||
* Gets whether the terminal has an active selection.
|
||||
*/
|
||||
@@ -412,21 +444,12 @@ declare module 'vscode-xterm' {
|
||||
*/
|
||||
selectAll(): void;
|
||||
|
||||
// /**
|
||||
// * Find the next instance of the term, then scroll to and select it. If it
|
||||
// * doesn't exist, do nothing.
|
||||
// * @param term Tne search term.
|
||||
// * @return Whether a result was found.
|
||||
// */
|
||||
// findNext(term: string): boolean;
|
||||
|
||||
// /**
|
||||
// * Find the previous instance of the term, then scroll to and select it. If it
|
||||
// * doesn't exist, do nothing.
|
||||
// * @param term Tne search term.
|
||||
// * @return Whether a result was found.
|
||||
// */
|
||||
// findPrevious(term: string): boolean;
|
||||
/**
|
||||
* Selects text in the buffer between 2 lines.
|
||||
* @param start The 0-based line index to select from (inclusive).
|
||||
* @param end The 0-based line index to select to (inclusive).
|
||||
*/
|
||||
selectLines(start: number, end: number): void;
|
||||
|
||||
/**
|
||||
* Destroys the terminal and detaches it from the DOM.
|
||||
@@ -455,6 +478,12 @@ declare module 'vscode-xterm' {
|
||||
*/
|
||||
scrollToBottom(): void;
|
||||
|
||||
/**
|
||||
* Scrolls to a line within the buffer.
|
||||
* @param line The 0-based line index to scroll to.
|
||||
*/
|
||||
scrollToLine(line: number): void;
|
||||
|
||||
/**
|
||||
* Clear the entire buffer, making the prompt line the new first line.
|
||||
*/
|
||||
@@ -470,7 +499,7 @@ declare module 'vscode-xterm' {
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param key The option key.
|
||||
*/
|
||||
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'termName'): string;
|
||||
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'termName'): string;
|
||||
/**
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param key The option key.
|
||||
@@ -503,6 +532,12 @@ declare module 'vscode-xterm' {
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'fontFamily' | 'termName' | 'bellSound', 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.
|
||||
@@ -545,6 +580,12 @@ declare module 'vscode-xterm' {
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'theme', value: ITheme): void;
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param key The option key.
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'cols' | 'rows', value: number): void;
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param key The option key.
|
||||
@@ -571,16 +612,17 @@ declare module 'vscode-xterm' {
|
||||
* @param addon The addon to apply.
|
||||
*/
|
||||
static applyAddon(addon: any): void;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Modifications to official .d.ts below
|
||||
|
||||
// Modifications to official .d.ts below
|
||||
declare module 'vscode-xterm' {
|
||||
interface Terminal {
|
||||
buffer: {
|
||||
/**
|
||||
* The viewport position.
|
||||
*/
|
||||
y: number;
|
||||
ybase: number;
|
||||
ydisp: number;
|
||||
x: number;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -606,6 +648,6 @@ declare module 'vscode-xterm' {
|
||||
|
||||
webLinksInit(handler?: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions): void;
|
||||
winptyCompatInit(): void;
|
||||
charMeasure?: { height: number, width: number }
|
||||
charMeasure?: { height: number, width: number };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ declare module 'windows-mutex' {
|
||||
}
|
||||
|
||||
export function isActive(name: string): boolean;
|
||||
}
|
||||
}
|
||||
63
src/typings/windows-process-tree.d.ts
vendored
63
src/typings/windows-process-tree.d.ts
vendored
@@ -4,11 +4,60 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'windows-process-tree' {
|
||||
interface ProcessTreeNode {
|
||||
pid: number,
|
||||
name: string,
|
||||
children: ProcessTreeNode[]
|
||||
export enum ProcessDataFlag {
|
||||
None = 0,
|
||||
Memory = 1,
|
||||
CommandLine = 2
|
||||
}
|
||||
function get(rootPid: number, callback: (tree: ProcessTreeNode) => void): void;
|
||||
export = get;
|
||||
}
|
||||
|
||||
export interface IProcessInfo {
|
||||
pid: number;
|
||||
ppid: number;
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The working set size of the process, in bytes.
|
||||
*/
|
||||
memory?: number;
|
||||
|
||||
/**
|
||||
* The string returned is at most 512 chars, strings exceeding this length are truncated.
|
||||
*/
|
||||
commandLine?: string;
|
||||
}
|
||||
|
||||
export interface IProcessCpuInfo extends IProcessInfo {
|
||||
cpu?: number;
|
||||
}
|
||||
|
||||
export interface IProcessTreeNode {
|
||||
pid: number;
|
||||
name: string;
|
||||
memory?: number;
|
||||
commandLine?: string;
|
||||
children: IProcessTreeNode[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a tree of processes with the rootPid process as the root.
|
||||
* @param rootPid - The pid of the process that will be the root of the tree.
|
||||
* @param callback - The callback to use with the returned list of processes.
|
||||
* @param flags - The flags for what process data should be included.
|
||||
*/
|
||||
export function getProcessTree(rootPid: number, callback: (tree: IProcessTreeNode) => void, flags?: ProcessDataFlag): void;
|
||||
|
||||
/**
|
||||
* Returns a list of processes containing the rootPid process and all of its descendants.
|
||||
* @param rootPid - The pid of the process of interest.
|
||||
* @param callback - The callback to use with the returned set of processes.
|
||||
* @param flags - The flags for what process data should be included.
|
||||
*/
|
||||
export function getProcessList(rootPid: number, callback: (processList: IProcessInfo[]) => void, flags?: ProcessDataFlag): void;
|
||||
|
||||
/**
|
||||
* Returns the list of processes annotated with cpu usage information.
|
||||
* @param processList - The list of processes.
|
||||
* @param callback - The callback to use with the returned list of processes.
|
||||
*/
|
||||
export function getProcessCpuUsage(processList: IProcessInfo[], callback: (processListWithCpu: IProcessCpuInfo[]) => void): void;
|
||||
}
|
||||
|
||||
1
src/typings/yauzl.d.ts
vendored
1
src/typings/yauzl.d.ts
vendored
@@ -31,6 +31,7 @@ declare module 'yauzl' {
|
||||
}
|
||||
|
||||
export class ZipFile extends EventEmitter {
|
||||
readEntry();
|
||||
openReadStream(entry: Entry, callback: (err?: Error, stream?: Readable) => void);
|
||||
close();
|
||||
isOpen: boolean;
|
||||
|
||||
Reference in New Issue
Block a user