term.js.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Type definitions for term.js 0.0.7
  2. // Project: https://github.com/chjj/term.js
  3. // Definitions by: Steven Silvester <https://github.com/blink1073>
  4. declare module 'term.js' {
  5. /**
  6. * A terminal configuration.
  7. */
  8. export
  9. interface ITerminalConfig {
  10. colors?: string[];
  11. convertEol?: boolean;
  12. termName?: string;
  13. rows?: number;
  14. cols?: number;
  15. cursorBlink?: boolean;
  16. visualBell?: boolean;
  17. popOnBell?: boolean;
  18. scrollback?: number;
  19. screenKeys?: boolean;
  20. useStyle?: boolean;
  21. useEvents?: boolean;
  22. useFocus?: boolean;
  23. useMouse?: boolean;
  24. }
  25. /**
  26. * Typing for a term.js terminal object.
  27. */
  28. export
  29. class Terminal {
  30. static brokenBold: boolean;
  31. constructor(config: ITerminalConfig);
  32. options: ITerminalConfig;
  33. element: HTMLElement;
  34. colors: string[];
  35. rows: number;
  36. cols: number;
  37. visualBell: boolean;
  38. popOnBell: boolean;
  39. scrollback: number;
  40. on(event: string, callback: (arg: any) => void): void;
  41. open(el: HTMLElement): void;
  42. write(msg: string): void;
  43. resize(width: number, height: number): void;
  44. destroy(): void;
  45. }
  46. }