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

typescript(vx-geo): re-write packages in TypeScript #537

Merged
merged 11 commits into from
Oct 10, 2019

Conversation

williaster
Copy link
Collaborator

@williaster williaster commented Oct 2, 2019

🚀 Enhancements

This PR builds off #488 which introduces Typescript build config, and re-writes the @vx/geo package in TypeScript with detailed prop type annotations across all components. It leverages @types/d3-geo and @types/geojson where possible.

Closes #536.

Tests

  • CI
  • generates .d.ts files
  • functional /geo-mercator and /geo-custom demos

image

🐛 Bug Fix

  • Fixes bug where projection.precision was never set in Graticule or (any) Projection component.

💥 Breaking Changes

  • This PR introduces React.Fragments, which requires bumping the peerDep for react to ^16.3.0-0

@hshoff @schillerk @milesj @kristw @Rudeg

@williaster williaster force-pushed the chris--typescript-vx-geo branch from 76282ec to e19f7c1 Compare October 2, 2019 20:35
@williaster williaster changed the base branch from chris--typescript to master October 4, 2019 20:22
/**
* All props pass through to `<Projection projection="equalEarth" {...props} />`
*/
// @ts-ignore ts-migrate(2304) FIXME: Cannot find name '$TSFixMe'.
Copy link

Choose a reason for hiding this comment

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

Could we remove this ts-ignore ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops missed these, thanks!

/**
* All props pass through to `<Projection projection="naturalEarth" {...props} />`
*/
// @ts-ignore ts-migrate(2304) FIXME: Cannot find name '$TSFixMe'.
Copy link

Choose a reason for hiding this comment

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

Could we remove this ts-ignore ?

@williaster williaster force-pushed the chris--typescript-vx-geo branch from 8711ed0 to f51e7bd Compare October 9, 2019 20:19
@hshoff hshoff merged commit b403f81 into master Oct 10, 2019
@hshoff hshoff deleted the chris--typescript-vx-geo branch October 10, 2019 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-write @vx/geo in TypeScript
3 participants