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

Add typescript declarations #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

elsmr
Copy link

@elsmr elsmr commented Jun 15, 2020

  • dist folder now contains index.d.ts with type declarations for all exports

I left the build setup untouched, added tsc only to output the index.d.ts file

I tried it out in a project where I use react-zdog and it works well for me 😄

Let me know what you think!

fixes #22

}
)
type ZdogComponent<Primitive extends typeof Zdog.Anchor> = ForwardRefExoticComponent<
Omit<PrimitiveProps<Primitive>, 'addTo'> & RefAttributes<InstanceType<Primitive>>
Copy link
Author

Choose a reason for hiding this comment

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

Unsure if I should omit addTo here. Is this prop useful/used when using react-zdog?

@AurelienDud
Copy link

Hello.
Adding type declarations was a good job ... but are there any plans to make it public by releasing a new version of the library?
Thank you

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.

Typescript support
2 participants