2 * Copyright (c) 2019 The xterm.js authors. All rights reserved.
6 import { Terminal, ITerminalAddon } from 'xterm';
8 declare module 'xterm-addon-fit' {
10 * An xterm.js addon that enables resizing the terminal to the dimensions of
11 * its containing element.
13 export class FitAddon implements ITerminalAddon {
15 * Creates a new fit addon.
21 * @param terminal The terminal the addon is being loaded in.
23 public activate(terminal: Terminal): void;
28 public dispose(): void;
31 * Resizes the terminal to the dimensions of its containing element.
36 * Gets the proposed dimensions that will be used for a fit.
38 public proposeDimensions(): ITerminalDimensions;
42 * Reprepresents the dimensions of a terminal.
44 export interface ITerminalDimensions {
46 * The number of rows in the terminal.
51 * The number of columns in the terminal.