-
-
Notifications
You must be signed in to change notification settings - Fork 752
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 #381
TypeScript support #381
Comments
Oh, just saw #64... But maybe leave this open? So some people will offer help? |
The best way to move this forward would be to start a repository with some basic Typescript definitions (in #64 I posted some pointers on where to start) and continue I can leave this issue open for another month or two but the other issue was open for almost a year with nobody picking it up. As mentioned there, the current core team is not using Typescript or Angular so it isn't really on our radar (and we'd prefer only keeping issues open if there is a chance that they'll be addressed in the foreseeable future). |
I think @Harangue has been working on some basic definitions. Maybe we can move the discussion we had on Slack about where they would live over here? |
sure! If need close this issue, just go ahead. |
It will be really nice if typescript can be supported.. how can I help? |
@rollymaduk I've made some decent progress on definitions for Feathers, but we have yet to establish the best way to distribute them (and things are a little transitional with TypeScript 2 about to release). If you'd like to have something to work off until then, you can see this gist I've worked on. |
@Harangue really nice work infact it looks quite ready.. I guess some areas that may require some attention would be incorporating some basic plugins like authentication, providers (rest,socke.io,primus) and some of the db adapters right? please what do you mean by the best way to distribute them? |
I'm not sure if we discussed this yet, but I think it'll be fine if we distribute the Typescript definitions in the main repository as long as there is someone to maintain and keep them up to date. So once they are ready, we can make it part of a Feathers 2.1 release (which I think might also ship with some warnings that e.g. callbacks in services will be deprecated in v3). |
|
So @Harangue has pretty much implemented a large set of the Feathers Typescript definitions already in https://gist.github.com/harangue/9d4ed79118e2656f5e3d2d699296ed36 we just need someone to review and potentially finalize them and submit them into the TypeScript definitions repository. I am going to make this part of the Auk release which will land before the end of the year. If nobody steps up until then this issue will be closed for good and there will be no official TypeScript support or further discussion about this other than a pull request for the whole thing. |
If their quality is good you should consider bundling the definitions with Feathers. I think a lot of people would want to avoid using a secondary package manager as much as possible. |
They'd be installable via |
I thought you just add them to https://github.com/DefinitelyTyped/DefinitelyTyped. Whatever is the normal way of doing this. If we add them to the core repo the other plugin repositories probably need definitions added accordingly. |
From the DefinitelyTyped FAQ:
Didn't know that. So adding them to DefinitelyTyped would suffice. |
Ah, JS. You're gone for a month or two and the ecosystem evolves 😄 |
Sorry that there's been radio silence about this on my end for so long. I just released another revision of the gist today that fixes some issue I'd had with the old typings. I'm finally able to start working with Feathers again on one of my projects, and I expect to be adding typings at the very least for the modules I find myself using. The definition as it exists in the gist is ready to be submitted to Definitely Typed except for 1) typings tests (just need to pull some examples from the Feathers docs) and 2) JS Doc annotations (which would be nice for intellisense, but are not essential). Technically the hook typings should be extracted to feathers-hooks as well. Extending typings here gets a little messy however, as |
Good to have you back @Harangue. I think we can leave the hook typings in here for now since we are planning to make hooks part of core (see #408). Also the typings might need to be updated with the new |
@Harangue when do you think you will be submitting your types to definitely typed? |
Hey everyone, really cool to see TypeScript defs coming along. @Harangue, what's your recommendation for importing feathers in conjunction with the defs in your gist? They aren't exporting namespaces that match the |
Hey @subvertallchris, you can use
or
they're equivalent. :) Just when I thought I was getting time for Feathers again I got caught up in other stuff, but I'm hoping to have these definitions fleshed out completely by the new year. |
@j2L4e Your TS generator fork seems to be 404'ing ? Any news on this? Also, @Harangue how are you getting on? I am really keen to see this land and am happy to help the implementation of TS definition files, a fork with a |
It was hard to maintain, worked properly for mysql and local auth only and generator-feathers will be obsolete soon anyway. So I scrapped it.
Eagerly waiting for a release of the new cli
Am 19. Dezember 2016 14:41:42 MEZ, schrieb georgeedwards <notifications@github.com>:
…
@j2L4e Your TS generator fork seems to be 404'ing ? Any news on this?
Also, @Harangue how are you getting on? I am really keen to see this
land and am happy to help the implementation of TS definition files, a
fork with a `feathers generate --ts` flag to make the cli play with
typescript nicely or docs. Let me know.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#381 (comment)
|
Is there anyone still working on this issue? I would very much like to use this project with Typescript |
For the next version, @j2L4e has been doing some great work on polishing the typings. Here are the steps to try it out and beta test:
|
Just started migration from Feathers 2 to 3, index.d.ts files are now missing from the head @feathersjs packages. Any plans to restore them? |
As mentioned one comment above, they have been moved to https://github.com/feathersjs-ecosystem/feathers-typescript/tree/buzzard-j2L4e to be submitted to DefinitelyTyped. @j2L4e is too busy right now so it is up to somebody else to pick this up. From what I understood it is mostly getting the Linting passing and submitting them to DefinitelyTyped. I'll happily help whoever is willing to pick this up but have no plans to take it on myself. |
Yep, it was a lot more work than i had anticipated and feedback from the community was virtually zero. I will make it happen as soon as i find the time. Not too soon, though. |
if anyone would chime in here, it would be really really awesome. It's all about the DT linting now, that aside everythings working fine-ish a quick copy and paste from slack: guys, I'm really really busy at the moment, so the typings are anything but top priority. they do work but DefinitelyTyped is quite strict in terms of linting rules. if you could help with making the typings pass the definitelytyped linting process, that would be awesome check out my DT fork here https://github.com/j2L4e/definitelytyped, you'll find the feathersjs packages in clone, npm install and run the linter on one of the packages, e.g.
|
TypeScript definitions are waiting for review to be added to DefinitelyTyped at DefinitelyTyped/DefinitelyTyped#22805 |
Definitions are now accessible via NPM ! |
Yep, install @Erikma thanks for your support! |
@j2L4e Thank you for your work! But are you sure you have exported all |
you're right, those are missing. add a typings.d.ts file for now with:
no idea where urlencoded should go. |
|
Is that express or feathersjs/express? |
So you should be able to do |
Everything that's exported from |
Import @types/feathersjs__socket-commons |
Import ? I do not understand |
Sorry it should actually say 'Import @feathersjs/socket-commons'. You need to install its types.
|
If I install |
will be fixed via DefinitelyTyped/DefinitelyTyped#23195 please take any further issues over here: https://github.com/feathersjs-ecosystem/feathers-typescript/issues |
Issue tracking for TS definitions is a bit confusing. You're directing folks to the feathers-typescript repo but you mentioned "This repo is now obsolete". If you're not going to maintain the definitions in the respective repos and instead utilize DT, I think it'd make most sense to keep the issues in the DT repo as well, since that's presumably where the PRs will originate and be merged. |
I think we than decided to give it a try here. I've been getting requests through several channels, and directing people to go over there Was a quick way to centralize that. Personally, i dont really care where it goes as long as it's one place |
Is there any reason we can't use |
Yes. |
TypeScript definitions are now in DefinitelyTyped. Please direct any issues and questions to https://github.com/feathersjs-ecosystem/feathers-typescript/issues |
IMPORTANT: Feathers 4 and later has built-in TypeScript support. Please see the docs for more information
http://docs.feathersjs.com/frameworks/angular2.html
Now the demo uses
Please support TypeScript definitions to use
import
!The text was updated successfully, but these errors were encountered: