Skip to content

Commit

Permalink
Refactor to remove buffer import in types
Browse files Browse the repository at this point in the history
Closes GH-82.

Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
remcohaszing committed Sep 8, 2022
1 parent 493cda0 commit 6c5a2f7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.d.ts
@@ -1,13 +1,12 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
// @ts-ignore It’s important to preserve this ignore statement. This makes sure
// it works both with and without node types.
import {Buffer} from 'buffer'

import type {Reporter} from './lib/index.js'

/**
* This is the same as `Buffer` if node types are included, `never` otherwise.
*/
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
// @ts-ignore It’s important to preserve this ignore statement. This makes sure
// it works both with and without node types.
// eslint-disable-next-line node/prefer-global/buffer
type MaybeBuffer = any extends Buffer ? never : Buffer

/**
Expand Down

0 comments on commit 6c5a2f7

Please sign in to comment.