souvikinator / notion-to-md

Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
https://www.npmjs.com/package/notion-to-md
MIT License
1.08k stars 89 forks source link

Wrong typings - CustomTransformer? #93

Closed UgRoss closed 1 year ago

UgRoss commented 1 year ago

Hey 👋

Thank you for creating this library!

I think I've faced a small issue. When I'm trying to return false inside a transformer function of the setCustomTransformer method, I'm getting the following TS error:

Argument of type '(block: ListBlockChildrenResponseResult) => boolean' is not assignable to parameter of type 'CustomTransformer'. Type 'boolean' is not assignable to type 'string | Promise'.

However, this is what we have in README:

Screenshot 2023-07-05 at 22 48 54

is there an issue with typings or maybe README is outdated?

souvikinator commented 1 year ago

Hey there! Thanks for the issue I'll look into the PR and merge it.

souvikinator commented 1 year ago

Hello! This issue has been fixed and is live in v3.1.1 Thank you for your contribution and for using the package. Closing the issue. If the problem still persists, feel free to reopen the issue.

UgRoss commented 1 year ago

Hello! This issue has been fixed and is live in v3.1.1 Thank you for your contribution and for using the package. Closing the issue. If the problem still persists, feel free to reopen the issue.

Great, thank you!