-
Notifications
You must be signed in to change notification settings - Fork 132
Adding Typescript #271
Adding Typescript #271
Conversation
Thank you @georgeedwards! Definitely worth investigating more. Two things I can think of at the moment:
|
@daffl Thanks. As for codemods - this is what I am focusing on now. There is tscodeshift which looks promising, but needs work to expose the API we need. Additionally jscodeshift may support TypeScript which would obviously be a better outcome, so I am waiting to see how viable that is. As for could it live in a second repo, would that mean having a As for maintainers - obviously I'll be happy to do this, but for a second one, I don;t know if any of - @j2L4e @myknbani @jonlambert @harish2704 @eddyystop @ForsakenHarmony @rjsteinert @jsgoupil @AbraaoAlves @stevehipwell @Harangue would be interested in helping?? |
Happy to help with fixes of typings etc. |
Awesome - well I am happy to lead the initial dev effort. In fact, does anyone have a minimal Feathers example using TypeScript they would be willing to share? It would certainly be good to see how people would like to be using it. At the moment, I am being slowed down by troubleshooting my generated typescript's issues with exports and types e.g.
etc. All fixable but a bit boring, so I am focussing on the AST transformations and an alternative to jscodeshift at the moment. |
@georgeedwards I'll close this for now. It would still be great to see a TS fork of the generator but I have the feeling this might be much easier once it works with ES modules (the automated codemods are the tricky part here). It probably also makes more sense to have it in a separate repository. Working with @j2L4e on the definitions for v3 at the moment over at https://github.com/feathersjs-ecosystem/feathers-typescript so hopefully once that is completed and the generator supports ES modules this can be looked into again more. |
Just a proposal for how to add TS support to the cli. Not ready yet, but opening this as somewhere to discuss the work. Would love to hear what you think.
I have done some work on app initial generation, which generates fine. There are some compilation errors, but they will be solved when the feathers-error patch is merged and released.
I have also done some work on the authentication function. But I believe the
feathers g authentication
command is "launched by the core cli project, so I'll need to create a version of the cli which has my dev generator as a dependancy to test this? My only query on this (I am not particularly familiar with developing with Yeoman), is that currently you are asked what language you want to use on every command. Is there any way to make your answer persist?