Skip to content

TypeScript #234

@peterp

Description

@peterp

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 Integrate GraphQL-ESLint #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

Tooling

  • Does linting work?
  • Does jest work?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions