11/**
2- * @typedef { import('unist').Literal } Literal
3- * @typedef { import('unist'). Node } Node
2+ * @import {Compiler, Parser, Plugin} from 'unified'
3+ * @import {Literal, Node} from 'unist'
44 */
55
66import { unified } from 'unified'
77
88export const processor = unified ( )
99 . use (
10- /** @type {import('unified'). Plugin<[], string, Node> } */
10+ /** @type {Plugin<[], string, Node> } */
1111 // @ts -expect-error: TS is wrong about `this`.
1212 function ( ) {
13- /** @type {import('unified'). Parser<Node> } */
13+ /** @type {Parser<Node> } */
1414 this . parser = function ( value ) {
1515 /** @type {Literal } */
1616 const node = { type : 'text' , value}
@@ -19,10 +19,10 @@ export const processor = unified()
1919 }
2020 )
2121 . use (
22- /** @type {import('unified'). Plugin<[], Node, string> } */
22+ /** @type {Plugin<[], Node, string> } */
2323 // @ts -expect-error: TS is wrong about `this`.
2424 function ( ) {
25- /** @type {import('unified'). Compiler<Node, string> } */
25+ /** @type {Compiler<Node, string> } */
2626 this . compiler = function ( tree ) {
2727 const node = /** @type {Literal } */ ( tree )
2828 return String ( node . value )
0 commit comments