Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tty.d.ts 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. declare module 'tty' {
  2. import * as net from 'net';
  3. function isatty(fd: number): boolean;
  4. class ReadStream extends net.Socket {
  5. constructor(fd: number, options?: net.SocketConstructorOpts);
  6. isRaw: boolean;
  7. setRawMode(mode: boolean): this;
  8. isTTY: boolean;
  9. }
  10. /**
  11. * -1 - to the left from cursor
  12. * 0 - the entire line
  13. * 1 - to the right from cursor
  14. */
  15. type Direction = -1 | 0 | 1;
  16. class WriteStream extends net.Socket {
  17. constructor(fd: number);
  18. addListener(event: string, listener: (...args: any[]) => void): this;
  19. addListener(event: "resize", listener: () => void): this;
  20. emit(event: string | symbol, ...args: any[]): boolean;
  21. emit(event: "resize"): boolean;
  22. on(event: string, listener: (...args: any[]) => void): this;
  23. on(event: "resize", listener: () => void): this;
  24. once(event: string, listener: (...args: any[]) => void): this;
  25. once(event: "resize", listener: () => void): this;
  26. prependListener(event: string, listener: (...args: any[]) => void): this;
  27. prependListener(event: "resize", listener: () => void): this;
  28. prependOnceListener(event: string, listener: (...args: any[]) => void): this;
  29. prependOnceListener(event: "resize", listener: () => void): this;
  30. /**
  31. * Clears the current line of this WriteStream in a direction identified by `dir`.
  32. */
  33. clearLine(dir: Direction, callback?: () => void): boolean;
  34. /**
  35. * Clears this `WriteStream` from the current cursor down.
  36. */
  37. clearScreenDown(callback?: () => void): boolean;
  38. /**
  39. * Moves this WriteStream's cursor to the specified position.
  40. */
  41. cursorTo(x: number, y?: number, callback?: () => void): boolean;
  42. cursorTo(x: number, callback: () => void): boolean;
  43. /**
  44. * Moves this WriteStream's cursor relative to its current position.
  45. */
  46. moveCursor(dx: number, dy: number, callback?: () => void): boolean;
  47. /**
  48. * @default `process.env`
  49. */
  50. getColorDepth(env?: {}): number;
  51. hasColors(depth?: number): boolean;
  52. hasColors(env?: {}): boolean;
  53. hasColors(depth: number, env?: {}): boolean;
  54. getWindowSize(): [number, number];
  55. columns: number;
  56. rows: number;
  57. isTTY: boolean;
  58. }
  59. }