Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript support #12

Open
calebeaires opened this issue Apr 29, 2021 · 17 comments
Open

TypeScript support #12

calebeaires opened this issue Apr 29, 2021 · 17 comments
Labels
enhancement New feature or request

Comments

@calebeaires
Copy link

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

@galvez
Copy link
Member

galvez commented Apr 29, 2021

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!

@jfsiii
Copy link

jfsiii commented Oct 6, 2021

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).

@galvez
Copy link
Member

galvez commented Oct 7, 2021

@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 galvez added the enhancement New feature or request label Oct 7, 2021
@galvez galvez changed the title typescript support and example TypeScript support Oct 7, 2021
@calebeaires
Copy link
Author

@galvez, hi! hope this issue is active!

@dimitropoulos
Copy link

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

@rtritto
Copy link
Contributor

rtritto commented Mar 18, 2023

Any update?

@dimitropoulos please can you start a PR?

@dimitropoulos
Copy link

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.

@rtritto
Copy link
Contributor

rtritto commented Mar 20, 2023

Ok

FYI @galvez

@spaceemotion
Copy link

spaceemotion commented Nov 12, 2023

Not sure if this is the right thread, but I saw #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.

@paynecodes
Copy link

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

@galvez
Copy link
Member

galvez commented Dec 5, 2023

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!

@tvarwig
Copy link

tvarwig commented Jan 29, 2024

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.

@galvez
Copy link
Member

galvez commented Jan 29, 2024

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!

@tvarwig
Copy link

tvarwig commented Jan 29, 2024

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.

@gardevgranade
Copy link

Anything new here?

@aleksanderwalczuk
Copy link

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

@onlywei
Copy link
Contributor

onlywei commented May 21, 2024

With this plugin, I can't figure out when I'm supposed to use tsc to compile my server code. The docs just say to use node server.js to run it, but I have server.ts. Does anyone have an example of some working package.json scripts using this plugin while writing the both the browser code and the server code in TypeScript?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests