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

Feature Request: Ease into TypeScript #513

Open
colelawrence opened this issue Jun 26, 2019 · 0 comments
Open

Feature Request: Ease into TypeScript #513

colelawrence opened this issue Jun 26, 2019 · 0 comments

Comments

@colelawrence
Copy link
Contributor

Before writing this feature request I have:
[ ] checked through the issue queue to see if this feature has already been requested
[ ] checked through the [rfcs] (https://github.com/qri-io/rfcs) to see if this feature has already been requested

Is your feature request related to a problem? Please describe.
I like knowing what is going to happen when I run my code.
I like consistent and predictable usage and module resolution behavior.
I like having a minimal configuration which style gives me access to the latest features of ESNext.
I like when my editor is able to help me write documented code easily, and immediately shows me the value of documenting my code by providing the above capabilities.

Describe the solution you'd like
I believe that we could simplify our build system and begin using TypeScript in a single step by replacing babel plugins with just the ts-loader. I started a POC in my own branch which has 80% of the run-scripts working (not there yet with tests or linters, yet).

Describe alternatives you've considered
I've considered simply using JSDoc tags across js files, which gave me a great start, but in the end has many limitations (especially when approaching the definition of a stateful React component's prop types). JSDoc is also not coupled to the actual build system, so even if you don't have any type errors, there can be very subtle issues in runtime (thinking about null checks and the like).

Additional context
Again, my branch is at https://github.com/colelawrence/frontend/tree/feature/cl-06-21-storybook-designs
It started as a way to include some storybook files, and was a nice platform to begin this Proof of Concept since Storybook has its own webpack.config.js file to tune.

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

1 participant