Skip to content

Conversation

guillaumegarcia13
Copy link
Contributor

@guillaumegarcia13 guillaumegarcia13 commented Mar 15, 2021

[Typescript newbie here 👶🏻]
Not too sure about this one... 😬
Would happily be reviewed

Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChristianMurphy ChristianMurphy added ☂️ area/types This affects typings 🦋 type/enhancement This is great to have 🧒 semver/minor This is backwards-compatible change labels Mar 15, 2021
@guillaumegarcia13
Copy link
Contributor Author

Hi @ChristianMurphy!
Thank you very much for the guidance.
Hopefully, it's OK now. 😅

Copy link
Member

@ChristianMurphy ChristianMurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following up @guillaumegarcia13! Just a few more tweaks and this should be good to go!

@ChristianMurphy
Copy link
Member

Would it be possible to have type tests for this PR?
Similar to https://github.com/stefanprobst/xast-util-sitemap/blob/2a1a85a33cbd5a565f4c7fef7f142160a596bd6d/types/test.ts which was added in syntax-tree/xast-util-sitemap#1

@wooorm wooorm changed the title adds type definitions Add types Apr 2, 2021
types/index.d.ts Outdated
* @param options Whether to drop parent nodes if they had children, but all their children were filtered out. Default is {cascade: true}
* @param test is-compatible test (such as a type)
*/
export function remove<T extends Node>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is exported using module.exports = remove.

To reflect this correctly in the types, this should be exported using:

export = remove

@wooorm wooorm merged commit 17f2167 into syntax-tree:main Apr 2, 2021
@wooorm
Copy link
Member

wooorm commented Apr 2, 2021

Thanks all, released in 2.1.0!

@guillaumegarcia13
Copy link
Contributor Author

Thank you all for your patience and advice. 🙏🏻
Sorry for all the "noise" generated by my numerous commits. 🙇🏻‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☂️ area/types This affects typings 💪 phase/solved Post is done 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have
Development

Successfully merging this pull request may close these issues.

4 participants