Closed Unluckymichell closed 3 years ago
Hi @Unluckymichell ,
Glad to hear that you use react-windows-ui in your project,
I am apologizing for not added d.ts
files to this project this issue is also pinged by @Myzel394
And now i believe that the d.ts
files are needed asap.
so stared figuring out creating the files if you are thinking of creating the files please also create a pull request
we will be happy
or also try it by myself so it can be compatible with typescript project.
I think it would be better to refactor the jsx files to tsx files now. Otherwise we will be later at the same moment as we are now. @virtualvivek
HI @Myzel394 , @Unluckymichell ,
I started to create typing for the available .jsx
components
@Myzel394 can it be sufficient for now to use only typings, i have checked few components currently and working great with VSCode and intelliSense.
@Myzel394 if you are interested to optimize the .d.ts
you can also do that. iam on the way completing this file
@virtualvivek Please don't put all definitions in one file. Create a d.ts file for each component. This way you profit from a clean code base :D
@Myzel394 yes you are right i forget that in future if we have to edit any component it will become blender to search in a big d.ts file for now will create it for each component seperately. Thanks for the suggestion.
Btw, AFAIK "SFC" shouldn't be used, you can simply use "Component" and pass the props as a generic to it
it will like this??
export interface ButtonProps {
value?: string;
}
declare const Button: React.Component<ButtonProps>
Exactly, I did it like this
Thankyou @Myzel394 for helping me out :smile: Regards you both @Unluckymichell and @Myzel394 for pingind for typescripting maybe it will never added without this pings.
Nice to see this added so fast. If i can still help with any types or if i should update the jsx to tsx files later please tell me.
@virtualvivek you can also contact me over Matrix @myzel394:matrix.org
Hi @Unluckymichell ,
I have added all the type definitions, yes you can help us in many ways,
Can you please see the type definitions and check everything is fine to be deployed.
You can find speific .d.ts
files using link: src/lib/src/components/ComponentName/index.d.ts
We can close this issue after successful publishing in @npm.
Hi @Myzel394 , Sure i can contact you if encountered in any issue. :D Thankyou in advance.
@virtualvivek See my pull request #4
I would like to use these components in a typescript / react project. (I will do a fork later this week and create the definitions myself)