-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 definition #6
Conversation
Thanks for creating a TypeScript definition. 🙌 Can you follow this styleguide? Some examples: |
Friendly bump :) |
Hey @sindresorhus! Finally got around to updating this to use the styleguide. One thing: I'm not sure which React type to use on an instance of a React Component -- do you? |
I don't. Maybe look at some other React package with a index.d.ts file and see how they do it? |
I poked around on GitHub and found a number of folks using React + tsd, but none of them were checking the type of a React node: https://github.com/search?q=expectType+tsd+react&type=Code From inspecting the
It seems like Give that, I just removed the Does that seem good to you? :) |
👍 |
This PR adds TS types to
ink-link
.I based the typings on
ink-text-link
: https://github.com/vadimdemedes/ink-text-inputIt also includes the
fallback
prop added in this PR: #5