cherry-markdown
cherry-markdown copied to clipboard
[Bug report] The API does not have type constraints for functions.
Describe the bug
-
toolbar.toolbarHandlers.list(type:string)andtoolbar.toolbarHandlers.graph(type:string). Both can accept string or number. However, in the source code,typeis passed in as a type array index, can it only benumber. -
The APIs does not have type constraints for functions.
Reproduction
https://github.com/RSS1102/cherry-markdown-react-demo/blob/main/src/apis/toolbarHandlersApi.tsx#L17C1-L17C1
System Info
System:
OS: Windows 10 10.0.22621
CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
Memory: 2.60 GB / 13.86 GB
Binaries:
Node: 18.12.1 - E:\node\node.EXE
Yarn: 1.22.19 - E:\node\yarn.CMD
npm: 9.8.0 - E:\node\npm.CMD
pnpm: 8.6.9 - E:\node\pnpm.CMD
Browsers:
Edge: Spartan (44.22621.2215.0), Chromium (116.0.1938.69)
Internet Explorer: 11.0.22621.1
Validations
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a minimal reproducible of the bug.
Help us
Yes, I would like to try submitting a PR for this issue.