Open owattenmaker opened 3 years ago
Some notes: people watching #38 might want to check this out
Also, amazing library, and I hope it continues to grow!
@owattenmaker Thanks for this awesome work, would you like to fork the repo and open a PR? I can do that as well, but since you did the hard work here you deserve the credit haha.
Having a TS declaration file is something that we've been thinking about adding for a while, so this is really cool 😄
@owattenmaker would you like to fork the repo and open a PR to add ts definitions? thanks
Hello.
I wanted types and was tired of writing
// @ts-ignore
before every import. So I went through every component and created types for each of them. It's mostly un-tested, but seems to work.I was going to create a pr into the
DefinitelyTyped
repo, so you could install@types/react95
, but they give you a hard time when doing that if you're not the author/maintainer of the project.I think I'll just post them here, and then you can use them how you please, plus it might help others in the mean time so they can copy these same files until it get's merged in.
I've created 3
.d.ts
files, the first two containing the actual type definitions corresponding to thecomponents
and thecommon
exports that were built.These types are also all built by hand, which means I tried my best on some of them when it came to the event handler functions being passed in. I believe them to be correct, but people may report otherwise 🤷♂️
anyways:
components.d.ts
:common.d.ts
and finally
index.d.ts
Let me know if you find anything useful