Skip to content

Add types#1

Merged
wooorm merged 3 commits intomainfrom
unknown repository
Jul 30, 2020
Merged

Add types#1
wooorm merged 3 commits intomainfrom
unknown repository

Conversation

@pd4d10
Copy link
Copy Markdown
Contributor

@pd4d10 pd4d10 commented Jul 26, 2020

Hi,

We are using several libs of remark and rehype ecosystem in TypeScript projects. This PR adds the type definition.

If accepted I'm glad to add types for other libs too.

@codecov-commenter

This comment has been minimized.

Copy link
Copy Markdown
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 @pd4d10!
Typing additions are welcome!

A pattern we've been following throughout unified and remark is adding typings along side type tests and dtslint.
Having these solves three problems: It ensures the types are compatible with unified, it describes what versions of typescript are supported, and the tests double as examples for future reference.

Another recent typings PR to a remark project gives a good example of dtslint and type tests setup remarkjs/remark-html#32

@pd4d10
Copy link
Copy Markdown
Contributor Author

pd4d10 commented Jul 28, 2020

@ChristianMurphy Thanks! Updated

Copy link
Copy Markdown
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 @pd4d10!

Comment thread types/index.d.ts
Co-authored-by: Christian Murphy <[email protected]>
@ChristianMurphy ChristianMurphy requested a review from a team July 28, 2020 13:07
@ChristianMurphy ChristianMurphy added ☂️ area/types This affects typings 🦋 type/enhancement This is great to have 🧑 semver/major This is a change labels Jul 28, 2020
@wooorm wooorm changed the title Add type definition Add types Jul 30, 2020
@wooorm wooorm merged commit ff79c93 into remarkjs:main Jul 30, 2020
@wooorm
Copy link
Copy Markdown
Member

wooorm commented Jul 30, 2020

Thanks @pd4d10! Released in 2.0.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☂️ area/types This affects typings 🧑 semver/major This is a change 🦋 type/enhancement This is great to have

Development

Successfully merging this pull request may close these issues.

6 participants