Skip to content

3rd overload signature of FrozenProcessor.run should accept ParseTree instead of CompileTree #173

@alvinleung1996

Description

@alvinleung1996

Initial checklist

Affected packages and versions

unified 10.1.0

Link to runnable example

No response

Steps to reproduce

The 3rd overload signature of FrozenProcessor.run is incorrect.

unified/index.d.ts

Lines 307 to 321 in c3ba2cd

/**
* Run transforms on the given node.
*
* @param node
* Tree to transform.
* @param file
* File associated with `node`.
* `VFile` or anything that can be given to `new VFile()`.
* @returns
* Promise that resolves to the resulting tree.
*/
run(
node: Specific<Node, CompileTree>,
file?: VFileCompatible | undefined
): Promise<Specific<Node, CompileTree>>

Expected behavior

run(
    node: Specific<Node, ParseTree>,
    file?: VFileCompatible | undefined
): Promise<Specific<Node, CompileTree>>

Actual behavior

run(
    node: Specific<Node, CompileTree>,
    file?: VFileCompatible | undefined
): Promise<Specific<Node, CompileTree>>

Runtime

Node v16

Package manager

Other (please specify in steps to reproduce)

OS

Linux

Build and bundle tools

Webpack

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions