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-pattern): re-write package in TypeScript #503

Merged
merged 8 commits into from
Oct 8, 2019

Conversation

williaster
Copy link
Collaborator

🚀 Enhancements

This PR builds off of #488 which added TypeScript build support, and converts the @vx/pattern package to TypeScript.

Closes #502.

Testing

  • CI
  • Generates .d.ts files
  • tested functionally with /patterns

💥 Breaking Changes

  • PatternOrientation is no longer the default export of @vx/patterns/lib/constants and is instead a named export. PatternOrientation is used as the export name if importing from the index: import { PatternOrientation } from '@vx/pattern'

@hshoff @schillerk @milesj @techniq @kristw

packages/vx-pattern/src/constants/index.ts Outdated Show resolved Hide resolved
/** Fill applied to circles. */
fill?: string;
/** className applied to circles. */
className?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

How are the props ordered by?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there is not enforced ordering, I enabled several new rules in the nimbus upgrade but decided that was too big an undertaking / can't auto-fix.

packages/vx-pattern/src/patterns/Lines.tsx Show resolved Hide resolved

describe('<PatternWaves />', () => {
beforeEach(() => {
global.console.error = jest.fn();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

highlighting that nimbus mocks out console.error to throw, so we don't have to do this ourselves anymore.

@williaster williaster changed the base branch from chris--typescript to master October 4, 2019 19:38
@hshoff hshoff added this to the v0.0.193 milestone Oct 8, 2019
@hshoff hshoff merged commit 8acc90a into master Oct 8, 2019
@hshoff hshoff deleted the chris--typescript-vx-pattern branch October 8, 2019 15:28
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/pattern in TypeScript
3 participants