react icon indicating copy to clipboard operation
react copied to clipboard

There are not types available to use it with typescript

Open dheerajsh opened this issue 6 years ago • 12 comments

I wanted to use it with my typescript-react project but can not use it because types are not available for the lib.

dheerajsh avatar Apr 04 '19 11:04 dheerajsh

We are starting to use typescript in various applications. We'd appreciate your help in adding them if you are able.

randallknutson avatar Apr 04 '19 15:04 randallknutson

Is someone actively working on the type definitions? I would consider contributing, but I don't want to step on anyone's toes to do it.

peisenmann avatar Apr 17 '19 13:04 peisenmann

Nobody from Form.io is actively working on this so we would GREATLY appreciate your contribution!

travist avatar Apr 17 '19 14:04 travist

me too

BrianHey avatar Aug 09 '19 19:08 BrianHey

+1 for react-formio TS types 🙂

mm-dsibinski avatar Jun 26 '20 11:06 mm-dsibinski

@travist is it still valid?. I have been using some type's declaration to support it with my typescript application. I would like to add them here.

dheerajsh avatar Jul 10 '20 15:07 dheerajsh

The 5.x branch of formio.js uses the typescript compiler now! When we go to 5.x for react-formio, which shouldn't be too much longer, I will switch the compiler to use typescript as well. That should include all the types from formio.js.

randallknutson avatar Jul 13 '20 14:07 randallknutson

Sounds good, what about the react component types.?

dheerajsh avatar Jul 13 '20 15:07 dheerajsh

Those will be included with the switch of react-formio to using the typescript compiler.

randallknutson avatar Jul 13 '20 20:07 randallknutson

I also installed the newest https://www.npmjs.com/package/@formio/react, but can't use it with TypeScript because of no typings..

mm-dsibinski avatar Jun 23 '21 11:06 mm-dsibinski

@randallknutson

The 5.x branch of formio.js uses the typescript compiler now! When we go to 5.x for react-formio, which shouldn't be too much longer, I will switch the compiler to use typescript as well. That should include all the types from formio.js.

I could not see any active typescript compiler being used. So I added Typescript to generate the typedefs only, and made a PR. I haven't covered all the types (via jsdoc annotations) , and some maybe wrong, but it's a start and was enough for me to integrate into an existing project.

Are you interested in moving the project itself to typescript? I may have some time I can commit in the next few weeks to see if I can help?

jafin avatar Dec 13 '21 02:12 jafin

Anyone still looking for a fully wrapped TS implementation can try @tsed-formio.

jessetcofie avatar Aug 04 '22 12:08 jessetcofie

Some types were added to the @formio/react library. If you need something else, your contribution will be appreciated. I am closing the issue as it was created too long ago and there are no new comments here. Thanks!

TanyaGashtold avatar Aug 31 '23 13:08 TanyaGashtold