Files
vscode/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts

40 lines
1.3 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
// https://github.com/microsoft/vscode/issues/55718
/**
* An {@link Event} which fires when a {@link Terminal}'s dimensions change.
*/
export interface TerminalDimensionsChangeEvent {
/**
* The {@link Terminal} for which the dimensions have changed.
*/
readonly terminal: Terminal;
/**
* The new value for the {@link Terminal.dimensions terminal's dimensions}.
*/
readonly dimensions: TerminalDimensions;
}
export namespace window {
/**
* An event which fires when the {@link Terminal.dimensions dimensions} of the terminal change.
*/
export const onDidChangeTerminalDimensions: Event<TerminalDimensionsChangeEvent>;
}
export interface Terminal {
/**
* The current dimensions of the terminal. This will be `undefined` immediately after the
* terminal is created as the dimensions are not known until shortly after the terminal is
* created.
*/
readonly dimensions: TerminalDimensions | undefined;
}
}