question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.


This 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 in create-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 the importAll.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 from api/src/lib/user.ts with getCurrentUser in useAuth

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:closed
  • Created 4 years ago
  • Reactions:119
  • Comments:30 (19 by maintainers)

github_iconTop GitHub Comments

35reactions
corbtcommented, Mar 8, 2021

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.

Redwood Project Total LOC Over Time

20reactions
lobosancommented, Sep 16, 2020

Once this is finished, maybe you can coin the term TAMStack (TypeScript, API, Markdown) 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found