diff --git a/packages/retext-dutch/lib/index.js b/packages/retext-dutch/lib/index.js index eed264f..3089087 100644 --- a/packages/retext-dutch/lib/index.js +++ b/packages/retext-dutch/lib/index.js @@ -8,7 +8,7 @@ import {ParseDutch} from 'parse-dutch' /** @type {import('unified').ParserClass} */ -/** @type {import('unified').Plugin} */ +/** @type {import('unified').Plugin<[], string, Root>} */ export default function retextDutch() { Object.assign(this, {Parser: unherit(ParseDutch)}) } diff --git a/packages/retext-english/lib/index.js b/packages/retext-english/lib/index.js index fb1b7bd..06114bd 100644 --- a/packages/retext-english/lib/index.js +++ b/packages/retext-english/lib/index.js @@ -6,9 +6,7 @@ import {unherit} from 'unherit' // @ts-expect-error: untyped. import {ParseEnglish} from 'parse-english' -/** @type {import('unified').ParserClass} */ - -/** @type {import('unified').Plugin} */ +/** @type {import('unified').Plugin<[], string, Root>} */ export default function retextEnglish() { Object.assign(this, {Parser: unherit(ParseEnglish)}) } diff --git a/packages/retext-latin/lib/index.js b/packages/retext-latin/lib/index.js index ef31f84..6372095 100644 --- a/packages/retext-latin/lib/index.js +++ b/packages/retext-latin/lib/index.js @@ -6,9 +6,7 @@ import {unherit} from 'unherit' // @ts-expect-error: untyped. import {ParseLatin} from 'parse-latin' -/** @type {import('unified').ParserClass} */ - -/** @type {import('unified').Plugin} */ +/** @type {import('unified').Plugin<[], string, Root>} */ export default function retextLatin() { Object.assign(this, {Parser: unherit(ParseLatin)}) } diff --git a/packages/retext-stringify/lib/index.js b/packages/retext-stringify/lib/index.js index 1a97cf3..f753927 100644 --- a/packages/retext-stringify/lib/index.js +++ b/packages/retext-stringify/lib/index.js @@ -4,7 +4,7 @@ import {toString} from 'nlcst-to-string' -/** @type {import('unified').Plugin} */ +/** @type {import('unified').Plugin<[], Root, string>} */ export default function retextStringify() { Object.assign(this, {Compiler}) } diff --git a/test.js b/test.js index bd8f94e..72b54f9 100644 --- a/test.js +++ b/test.js @@ -45,7 +45,7 @@ function eachParser(name) { const fp = './packages/retext-' + name + '/index.js' - /** @type {{default: import('unified').Plugin}} */ + /** @type {{default: import('unified').Plugin<[], string, Root>}} */ // type-coverage:ignore-next-line const mod = await import(fp)