TypeScript
See original GitHub issueThis tracking issue is no longer maintained, please reference the project board for the latest updates instead: https://github.com/redwoodjs/redwood/projects/2
We’re going to add first-class support for TypeScript and be an even better experience for JavaScript as a result.
Make the project that’s created by yarn create redwood-app
support TypeScript:
- Convert the
*.js
files increate-redwood-app
repo to TypeScript. - Transpile the new TypeScript files into JavaScript if the target is JavaScript. (JavaScript will be the default.)
- Add a flag to switch the target to TypeScript in the
create-redwood-app
package. - Check for presence of
tsconfig.json
file in a project
Make the generators TS/ JS aware: 👉See sub-Tracking Issue #523
- Make the generators understand that the target is TS/ JS.
- Rewrite the templates from JS into TS.
- When the target is JS transpile them.
The api side:
- Verify that we import
.ts
files via theimportAll.macro
(tests!) - We auto import
context
, is that a problem in the ts world? - Verify that the dev server works well with
.ts
files.
The bridge between api and web:
- Share type definitions from SDL in api with gql`` in web, fixed via #1321
- Share the
currentUser
returned fromapi/src/lib/user.ts
withgetCurrentUser
inuseAuth
The web side:
- Do we properly handle
.ts/ .tsx
files? - Do our auto-imported routes work properly with tslint?
Framework/Packages
- makeMergedSchema #563
Tooling
- Does linting work?
- Does jest work?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:119
- Comments:30 (19 by maintainers)
Top Results From Across the Web
TypeScript: JavaScript With Syntax For Types.
TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale. Try TypeScript Now. Online or...
Read more >TypeScript - Wikipedia
TypeScript is a free and open source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and...
Read more >TypeScript is a superset of JavaScript that compiles ... - GitHub
TypeScript is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript ...
Read more >TypeScript Introduction - W3Schools
TypeScript is a syntactic superset of JavaScript which adds static typing. This basically means that TypeScript adds syntax on top of JavaScript, ...
Read more >typescript - npm
TypeScript is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m an outsider here really excited about Redwood. First-class Typescript support is critical to me, so I wanted to get a sense on how Typescript adoption is going within the Redwood project itself. I wrote a quick script to parse the Redwood tree at each commit and count the lines of TS/JS to see the momentum. Looks like work in TS has been catching up fast, which gets me excited! Sharing the graph here in case anyone else finds it interesting.
Once this is finished, maybe you can coin the term TAMStack (TypeScript, API, Markdown) 😄