From 297aa8e849cec5cae4da4f6c18f954d1efcb8dfe Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 24 Jun 2024 13:51:30 +0200 Subject: [PATCH] Refactor to use `@import`s --- index.js | 5 +---- lib/anchors.js | 3 +-- lib/index.js | 2 +- test.js | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 47ba8c1..b5c6015 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,5 @@ /** - * @typedef {import('./lib/index.js').AnchorAllow} AnchorAllow - * @typedef {import('./lib/index.js').Options} Options - * @typedef {import('./lib/index.js').Result} Result - * @typedef {import('./lib/index.js').Sleep} Sleep + * @import {AnchorAllow, Options, Result, Sleep} from './lib/index.js' */ export {deadOrAlive, defaultAnchorAllowlist, defaultSleep} from './lib/index.js' diff --git a/lib/anchors.js b/lib/anchors.js index 37dc8d7..c79f792 100644 --- a/lib/anchors.js +++ b/lib/anchors.js @@ -1,6 +1,5 @@ /** - * @typedef {import('hast').Element} Element - * @typedef {import('hast').Root} Root + * @import {Element, Root} from 'hast' */ /** diff --git a/lib/index.js b/lib/index.js index 404c7d6..878c27f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,5 @@ /** - * @typedef {import('hast').Root} Root + * @import {Root} from 'hast' */ /** diff --git a/test.js b/test.js index cce1756..7e50fef 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ /** - * @typedef {import('vfile-message').VFileMessage} VFileMessage + * @import {VFileMessage} from 'vfile-message' */ import assert from 'node:assert/strict'