-
-
Notifications
You must be signed in to change notification settings - Fork 18
chore(package): add typescript declarations (types)
#10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@eugenefedotov approve ? |
michael-ciniawsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add them to https://github.com/DefinitelyTyped/DefinitelyTyped instead please, it's the recommended way advocated by the typescript team
types)
|
@michael-ciniawsky it's the recommended way when these are types added post-factum by the community. Does this mean that you don't wish to maintain these types in-repo in future versions? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwing my 2 cents into this PR 🙂
+1 for having types inside the repo instead of DefinitelyTyped. It will be easier to maintain.
EDIT: Just realized this PR is way too old 😅
| singleTags?: string[], | ||
| closingSingleTag?: string | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| type TreeNode = | |
| | { | |
| tag: string; | |
| attrs?: Record<string, string>; | |
| content?: Tree; | |
| } | |
| | string; | |
| type Tree = TreeNode[]; |
| closingSingleTag?: string | ||
| } | ||
|
|
||
| declare function postHTMLRender(tree: any, options?: Options): string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can be more precise with the tree type. I suggested a change above with the type Tree.
|
@0ctothorp Hi, any of your contributions is very important to us. Yes, PR is old and maybe you can offer the best option :) |
No description provided.