syntax-tree / unist-util-modify-children

utility to modify direct children of a parent
https://unifiedjs.com
MIT License
11 stars 4 forks source link

Would love TypeScript types for this package #4

Closed chmac closed 4 years ago

chmac commented 4 years ago

Subject of the feature

I think this is the first unist-util package that typescript wants types for. So first and foremost, thanks for all the really useful code that's already out there, this stuff is making my life a whole hella lot easier!

Any chance of adding types to this package? I guess I'll do a quick and dirty any type for now as my package typing fu is not so strong. I'd be happy to support with a PR or some review if that's helpful. I'd need some pointers on the PR front, but if you could potentially point me at another repo which does have types, maybe I could copy the typing concepts into this one, or something like that. Will wait to hear back before diving into it.

ChristianMurphy commented 4 years ago

Any chance of adding types to this package?

It's on the list to add these, there are over 300 repositories in syntax-tree + unified + remark + rehype + retext + redot, this isn't a repo we'd had a chance to add types to yet.

I'd be happy to support with a PR or some review if that's helpful. I'd need some pointers on the PR front, but if you could potentially point me at another repo which does have types, maybe I could copy the typing concepts into this one, or something like that.

Some examples to draw inspiration from https://github.com/syntax-tree/hast-util-to-html/pull/17 https://github.com/syntax-tree/unist-util-find-all-after/pull/7 https://github.com/syntax-tree/mdast-util-toc/pull/62 https://github.com/syntax-tree/unist-util-map/pull/1 https://github.com/syntax-tree/unist-util-inspect/pull/9 https://github.com/syntax-tree/unist-util-select/pull/7 https://github.com/syntax-tree/unist-builder/pull/3 https://github.com/syntax-tree/unist-util-filter/pull/2

wooorm commented 4 years ago

Released in 2.0.0!