Skip to content
This repository has been archived by the owner. It is now read-only.

TypeScript era #522

Closed
elkevinwolf opened this issue Dec 30, 2018 · 3 comments
Closed

TypeScript era #522

elkevinwolf opened this issue Dec 30, 2018 · 3 comments

Comments

@elkevinwolf
Copy link

@elkevinwolf elkevinwolf commented Dec 30, 2018

Now that you started migrating your personal projects to TypeScript, I some questions for you:

  1. What are your recommendations on moving from flow to TS?
  2. When developing a library, what should I take into account regarding build process?
  3. Will you be updating your testing JS course with TS?
@kentcdodds
Copy link
Owner

@kentcdodds kentcdodds commented Jan 4, 2019

Hey @kevinwolfcr! I answered this on my podcast: https://www.briefs.fm/3-minutes-with-kent/67

@joeycozza
Copy link
Collaborator

@joeycozza joeycozza commented Jan 28, 2019

Hey Kent, I was't able to find your typescript article directly on your blog...is it there yet?
Link to Kent's typescript article:
Why Every New Web App at Paypal Starts With Typescript

"What are your recommendations on moving from flow to TS?"

So first I'd say if you're happy with flow, just stick with flow. I was unhappy with flow and I'll talk about that in my blog post soon. So if you're happy with it, just stick with it. If you want to try out typescript, I'm pretty sure these 2 tools can be used together. You just want to setup the tooling for typescript. I'm afraid that isn't super trivial, like its a little tricky. Its pretty well defined, the community is really helpful. I would setup the tooling and then start moving things over time. So try to get to a releasable state as quickly as possible. Just add typescript typings for a single file then commit and publish that and push it out and over time you can do that.

"When developing a library, what should I take into account regarding build process?"

Please build your code before you publish it to NPM. You can feel free to publish the typescript files as well, but please build it. I'm using babel for my build process and I'm using the babel-preset-typescript and I'm real happy with that. It does limit you with a few things but not a whole lot. That's what I would recommend. So I just continue with my kcd-scripts things and build it like I always build things. So you can use rollup, or babel-cli or just use typescript. But whatever you do, just build it so that the code you publish to npm supports then environments you say that your library supports.

"Will you be updating your testing JS course with TS?"

I will be adding a video on there just like I have for flow. I think I have 1 maybe 2 videos for flow. I'll add another video for typescript but that's as far as I'm going to go with that.

@kentcdodds
Copy link
Owner

@kentcdodds kentcdodds commented Jan 28, 2019

Thank you @joeycozza!

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

Successfully merging a pull request may close this issue.

None yet
3 participants