Skip to content
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

Improve TypeScript definition, refactor definition to CommonJS compatible export #21

Merged
merged 5 commits into from
Apr 5, 2019
Merged

Improve TypeScript definition, refactor definition to CommonJS compatible export #21

merged 5 commits into from
Apr 5, 2019

Conversation

BendingBender
Copy link
Contributor

@BendingBender BendingBender commented Apr 1, 2019

Breaking change:

  • improve definition, take into account that transform function must return different types depending on silent mode
  • refactor definition to CommonJS compatible export

Waiting for tsdjs/tsd#22.

@sindresorhus sindresorhus marked this pull request as ready for review April 2, 2019 08:52
@BendingBender
Copy link
Contributor Author

BendingBender commented Apr 2, 2019

@sindresorhus Currently, we allow returning null or undefined from the *Transform functions. JS-wise it doesn't make a difference whether we return null or undefined or even a number. My changes are already breaking, should we limit this to just undefined for the sake of consistency?

@sindresorhus
Copy link
Owner

My changes are already breaking, should we limit this to just undefined for the sake of consistency?

👍

@sindresorhus sindresorhus merged commit da81433 into sindresorhus:master Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants