Skip to content

Commit

Permalink
Refactor to use @imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 17, 2024
1 parent 69f2884 commit 2989c04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/safe-http-client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @typedef {import('node:stream/web').ReadableStream<Uint8Array>} Uint8ArrayStream
* @import {ReadableStream} from 'node:stream/web'
*/

/**
Expand Down Expand Up @@ -168,7 +168,7 @@ export async function safeFetch(url, options, maxSize) {

/** @type {Array<Uint8Array>} */
const chunks = []
/** @type {Uint8ArrayStream} */
/** @type {ReadableStream<Uint8Array>} */
// type-coverage:ignore-next-line
const body = response.body
const reader = body.getReader()
Expand Down
3 changes: 1 addition & 2 deletions lib/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* @typedef {import('node:net').ListenOptions} ListenOptions
* @typedef {import('node:net').Server} Server
* @import {ListenOptions, Server} from 'node:net'
*/

/**
Expand Down

0 comments on commit 2989c04

Please sign in to comment.