Skip to content

Commit

Permalink
docs: add Deno.FsFile.isTerminal() migration snippet (denoland#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Feb 20, 2024
1 parent 7b3cc3e commit fb8a336
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions runtime/manual/advanced/migrate_deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,13 @@ See the [Deno 1.40 blog post][Deno 1.40 blog post] for details.

### `Deno.isatty()`

Use `Deno.stdin.isTerminal()`, `Deno.stdout.isTerminal()` or
`Deno.stderr.isTerminal()` instead.
Use `Deno.FsFile.isTerminal()`, `Deno.stdin.isTerminal()`,
`Deno.stdout.isTerminal()` or `Deno.stderr.isTerminal()` instead.

```diff
- Deno.isatty(file.rid);
+ file.isTerminal();
```

```diff
- Deno.isatty(Deno.stdin.rid);
Expand Down

0 comments on commit fb8a336

Please sign in to comment.