Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Move to Typescript #27

Open
jlengstorf opened this issue Nov 21, 2017 · 5 comments
Open

Move to Typescript #27

jlengstorf opened this issue Nov 21, 2017 · 5 comments

Comments

@jlengstorf
Copy link
Member

No description provided.

@jlengstorf jlengstorf mentioned this issue Nov 21, 2017
3 tasks
@jlengstorf jlengstorf changed the title [1.0] Move to Typescript Move to Typescript Dec 19, 2017
@kbrandwijk
Copy link
Member

kbrandwijk commented Dec 22, 2017

Still interested in moving to TS? 1.0 issue mentioned 'revisiting' this?

@jlengstorf
Copy link
Member Author

I have mixed feelings about it. On the one hand, I like the idea of strongly typed code. On the other, I worry that it makes the codebase inaccessible to a large portion of developers. (For example, I'm going to have to actually learn TS if we make this switch, as opposed to the passing familiarity I have now. I probably wouldn't work through that for an OSS project I didn't maintain.)

So maybe there's a question to answer before making the call: is there a measurable benefit of moving to TS vs. keeping our test coverage at 100% in plain JS?

@kbrandwijk
Copy link
Member

kbrandwijk commented Dec 22, 2017

On the consumer side: you should at least provide typings, so consumers of the library get type safety when using Typescript themselves. Maybe you can create a separate issue for that, I can PR that quite easily (after #63 becomes final).

On the development side: I believe there are a lot of benefits for using Typescript, most importantly the strong typing.
I recently came across this article: https://stackify.com/typescript-vs-javascript-migrate/

@jlengstorf
Copy link
Member Author

I just did a tiny bit of TS: Urigo/graphql-cli#78 🤓

I definitely agree about typings. Issue created: #65

I'll read this article and think a little more on whether or not we should fully convert.

@kbrandwijk
Copy link
Member

The linter doesn't really like what you did there 😄 https://circleci.com/gh/graphql-cli/graphql-cli/106

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants