source: trip-planner-front/node_modules/is-interactive/index.d.ts@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 717 bytes
Line 
1/// <reference types="node"/>
2
3declare namespace isInteractive {
4 interface Options {
5 /**
6 The stream to check.
7
8 @default process.stdout
9 */
10 readonly stream?: NodeJS.WritableStream;
11 }
12}
13
14/**
15Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678).
16
17It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
18
19This can be useful to decide whether to present interactive UI or animations in the terminal.
20
21@example
22```
23import isInteractive = require('is-interactive');
24
25isInteractive();
26//=> true
27```
28*/
29declare function isInteractive(options?: isInteractive.Options): boolean;
30
31export = isInteractive;
Note: See TracBrowser for help on using the repository browser.