From 6c5a2f769c29edfba3090edbdc4193b08e0ab629 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 8 Sep 2022 18:50:46 +0200 Subject: [PATCH] Refactor to remove buffer import in types Closes GH-82. Reviewed-by: Titus Wormer --- index.d.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 154bdc53..40e36202 100644 --- a/index.d.ts +++ b/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 /**