From 2989c049b52ea907f3936f2b0d6b960f6a5da1f8 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 17 Sep 2024 09:56:46 +0200 Subject: [PATCH] Refactor to use `@import`s --- lib/safe-http-client.js | 4 ++-- lib/server.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/safe-http-client.js b/lib/safe-http-client.js index 34764e7..af181cf 100644 --- a/lib/safe-http-client.js +++ b/lib/safe-http-client.js @@ -1,5 +1,5 @@ /** - * @typedef {import('node:stream/web').ReadableStream} Uint8ArrayStream + * @import {ReadableStream} from 'node:stream/web' */ /** @@ -168,7 +168,7 @@ export async function safeFetch(url, options, maxSize) { /** @type {Array} */ const chunks = [] - /** @type {Uint8ArrayStream} */ + /** @type {ReadableStream} */ // type-coverage:ignore-next-line const body = response.body const reader = body.getReader() diff --git a/lib/server.js b/lib/server.js index b5ebaf7..0c3bf2a 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1,6 +1,5 @@ /** - * @typedef {import('node:net').ListenOptions} ListenOptions - * @typedef {import('node:net').Server} Server + * @import {ListenOptions, Server} from 'node:net' */ /**