reactjs-solidjs-bridge icon indicating copy to clipboard operation
reactjs-solidjs-bridge copied to clipboard

[Feature request] Type declarations

Open danieltroger opened this issue 3 years ago • 6 comments

Would be amazing to have some typescript type declarations for this

danieltroger avatar Sep 07 '22 12:09 danieltroger

That's true. I wrote this long before I'd learned TypeScript. Feel free to add them!

I haven't had time to work on this library, and using SolidJS at work is getting farther and farther away based on the tech stack at my current job.

Sawtaytoes avatar Sep 07 '22 16:09 Sawtaytoes

I see. Sad that you can't use solid :( What are you using instead?

Going without type declarations right now but if I write some later I'll add them here.

danieltroger avatar Sep 08 '22 08:09 danieltroger

I'm using React only because that's what's established where I work.

Sawtaytoes avatar Nov 02 '22 19:11 Sawtaytoes

would you accept/merge a complete "translation" to typescript? I don't promise anything, but if we decide to adopt your package I might have to do it for work anyway.

vladnicula avatar Nov 06 '22 06:11 vladnicula

You can start with command: tsc --declaration --rootDir src --outDir dist --noEmit false --emitDeclarationOnly --allowJs false --checkJs false

many errors while running (is it expected maybe?) but d.ts files are made.

divinespear avatar Jun 13 '23 16:06 divinespear

I started fixing up the SolidJS side of things since I started a SolidJS project and need to render React components.

I converted most of the project to TypeScript in the master branch (forgot to make a feature branch). I also converted to Vite because it wasn't working right with the original Webpack implementation.

SolidJS is not playing nicely with the ReactJS though. Not sure how to get both to work. It's something to do with the Vite plugins. If I can fix that, I think it's in a "good enough" state.

Sawtaytoes avatar Jun 14 '23 01:06 Sawtaytoes