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

Export types in @visx/text #1106

Merged
merged 1 commit into from
Mar 12, 2021
Merged

Export types in @visx/text #1106

merged 1 commit into from
Mar 12, 2021

Conversation

jrmyio
Copy link
Contributor

@jrmyio jrmyio commented Mar 12, 2021

Currently @visx/text does not export its types. So the following does not work:
import { TextProps } from '@visx/text';

This PR adds the exporting of those types.

Ugly work-around until then:

import { Text } from '@visx/text';
Parameters<typeof Text>[0]>

Export types in @visx/text to allow `import { TextProps } from '@visx/text';`
Copy link
Collaborator

@williaster williaster left a comment

Choose a reason for hiding this comment

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

Thanks for the addition @ConneXNL 🙏 Looks good to me, we'll get it merged and released by end of day.

FYI a slightly less gross (but gross nonetheless) workaround for now is a deep import like import { TextProps } from '@visx/text/lib/types';

@williaster williaster merged commit b2a20a1 into airbnb:master Mar 12, 2021
@github-actions
Copy link

🎉 This PR is included in version v1.7.0 of the packages modified 🎉

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.

2 participants