Skip to content

Commit 6c5a2f7

Browse files
authored
Refactor to remove buffer import in types
Closes GH-82. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent 493cda0 commit 6c5a2f7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

index.d.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
2-
// @ts-ignore It’s important to preserve this ignore statement. This makes sure
3-
// it works both with and without node types.
4-
import {Buffer} from 'buffer'
5-
61
import type {Reporter} from './lib/index.js'
72

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

1312
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy