index.d.ts 323 B

123456789101112131415161718192021
  1. declare namespace terminalSize {
  2. interface Size {
  3. columns: number;
  4. rows: number;
  5. }
  6. }
  7. /**
  8. Reliably get the terminal window size.
  9. @example
  10. ```
  11. import terminalSize = require('term-size');
  12. terminalSize();
  13. //=> {columns: 143, rows: 24}
  14. ```
  15. */
  16. declare function terminalSize(): terminalSize.Size;
  17. export = terminalSize;