fastify-vite icon indicating copy to clipboard operation
fastify-vite copied to clipboard

TypeScript support

Open calebeaires opened this issue 3 years ago • 19 comments

This project is amazing. Would be great to have an example using typescript at both side: server and Vue 3

calebeaires avatar Apr 29 '21 12:04 calebeaires

It's on the TODO — while the core will remain StandardJS, we'll provide types for everything.

Will update this ticket when it's covered. Thank you!

galvez avatar Apr 29 '21 13:04 galvez

Is there any update on this? Both Fastify and Vite publish types, so I'd love to have them here as well.

Can we start with something now and improve it or are there other milestones before it can begin? I might be able to help out depending on what you need (if anything).

jfsiii avatar Oct 06 '21 19:10 jfsiii

@jfsiii I'd very much welcome help from TypeScript experts willing to stitch up these missing bits. I'm focused on other areas of as I'm already dog-fooding it, but don't really use TypeScript in my own projects.

galvez avatar Oct 07 '21 07:10 galvez

@galvez, hi! hope this issue is active!

calebeaires avatar Mar 05 '22 22:03 calebeaires

@galvez would you accept a PR that converts this entire repo to native TypeScript (without any logical changes)?

dimitropoulos avatar Feb 21 '23 18:02 dimitropoulos

Any update?

@dimitropoulos please can you start a PR?

rtritto avatar Mar 18 '23 03:03 rtritto

I am pretty willing to make such a PR, but I want to get an affirmative "go-ahead" from whoever would actually review/approve it before I start. I've been burned before with spending time converting a codebase to TypeScript just to later find that it's not a welcome change, so I always like to ask first.

dimitropoulos avatar Mar 20 '23 01:03 dimitropoulos

Ok

FYI @galvez

rtritto avatar Mar 20 '23 01:03 rtritto

Not sure if this is the right thread, but I saw https://github.com/fastify/fastify-vite/pull/118 incorporated into the v5 release, but the types don't get bundled as the package json still excludes them. Was this an oversight or intentional?

Edit: I just noticed that this also includes the new utils export.

spaceemotion avatar Nov 12 '23 18:11 spaceemotion

Virtual modules aren't supposed to work in TS projects right?

paynecodes avatar Dec 05 '23 19:12 paynecodes

You can eject all of them, refactor into TypeScript and then just make sure index.html and index.js are loading the TypeScript versions. This will be available out of the box in the next minor release, just want to make sure I have worked out all the kinks. If you do that and want to contribute your working setup as part of packages/fastify-react/virtual, that would speed up the process!

galvez avatar Dec 05 '23 19:12 galvez

Any update / timeline on typescript support? @galvez looks like v6.0 will have typescript support for Jan 2024. Is that still on track? Thank you for all that you do.

tvarwig avatar Jan 29 '24 05:01 tvarwig

We already have some stuff in dev waiting for a release, lots of new types etc.

Both @fastify/vue and @fastify/react will have TypeScript versions of its virtual packages in the next minor release.

I should find some time to prep over the week!

galvez avatar Jan 29 '24 05:01 galvez

We already have some stuff in dev waiting for a release, lots of new types etc.

Both @fastify/vue and @fastify/react will have TypeScript versions of its virtual packages in the next minor release.

I should find some time to prep over the week!

Sounds good! I will take a look.

tvarwig avatar Jan 29 '24 05:01 tvarwig

Anything new here?

gardevgranade avatar Mar 28 '24 09:03 gardevgranade

I'd also be pleased to know when it's going to be released.

aleksanderwalczuk avatar Mar 30 '24 09:03 aleksanderwalczuk