File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ export interface FrozenProcessor<
316
316
* Promise that resolves to the resulting tree.
317
317
*/
318
318
run (
319
- node : Specific < Node , CompileTree > ,
319
+ node : Specific < Node , ParseTree > ,
320
320
file ?: VFileCompatible | undefined
321
321
) : Promise < Specific < Node , CompileTree > >
322
322
Original file line number Diff line number Diff line change @@ -360,13 +360,19 @@ expectType<VFile & {result: ReactNode}>(
360
360
)
361
361
362
362
// A parser plugin defines the input of `.run`:
363
+ expectType < Promise < MdastRoot > > ( unified ( ) . use ( remarkParse ) . run ( someMdast ) )
363
364
expectType < MdastRoot > ( unified ( ) . use ( remarkParse ) . runSync ( someMdast ) )
365
+ expectError ( unified ( ) . use ( remarkParse ) . run ( someHast ) )
364
366
expectError ( unified ( ) . use ( remarkParse ) . runSync ( someHast ) )
365
367
366
368
// A compiler plugin defines the input/output of `.run`:
369
+ expectError ( unified ( ) . use ( rehypeStringify ) . run ( someMdast ) )
367
370
expectError ( unified ( ) . use ( rehypeStringify ) . runSync ( someMdast ) )
368
371
// As a parser and a compiler are set, it can be assumed that the input of `run`
369
372
// is the result of the parser, and the output is the input of the compiler.
373
+ expectType < Promise < HastRoot > > (
374
+ unified ( ) . use ( remarkParse ) . use ( rehypeStringify ) . run ( someMdast )
375
+ )
370
376
expectType < HastRoot > (
371
377
unified ( ) . use ( remarkParse ) . use ( rehypeStringify ) . runSync ( someMdast )
372
378
)
You can’t perform that action at this time.
0 commit comments