-
Notifications
You must be signed in to change notification settings - Fork 219
Exported transform type should return MaybePromise #495
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Since you introduced async transformers, transform now actually returns a MaybePromise<RenderableTreeNodes> from what i can tell.
Meanwhile, the exported transform function defines its return type as RenderableTreeNode (or RenderableTreeNode[])
We should probably update the exported function to match, otherwise we can't await the result without casting.
To reproduce
In a typescript project, try await Markdoc.transform(...) with an async transformer in your config. it'll work at runtime but will fail to build
Version
latest
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working