From 785d879b8aa392d7235f38076fef2b6d3e5adbee Mon Sep 17 00:00:00 2001 From: Nicola Molinari Date: Thu, 30 Jun 2022 09:53:34 +0200 Subject: [PATCH] docs: improvements based on suggestions --- website/src/content/development/adding-typescript.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/website/src/content/development/adding-typescript.mdx b/website/src/content/development/adding-typescript.mdx index a7c9250084..b56389fc17 100644 --- a/website/src/content/development/adding-typescript.mdx +++ b/website/src/content/development/adding-typescript.mdx @@ -55,12 +55,18 @@ By default, this is included in the TypeScript starter template `src/index.tsx` You can also include this in the `tsconfig.json` file in the `compilerOptions.types` field but we don't recommend to use that unless you are very familiar with the [implications of using the `types` field](https://www.typescriptlang.org/tsconfig#types). -Additional adjustments to other config files is also required, in particular: +Additional adjustments to other config files are also required, in particular: - `.prettierrc`: use the `typescript` parser. - `jest.test.config.js`: use the `@commercetools-frontend/jest-preset-mc-app/typescript` preset. - `jest.eslint.config.js`: include the file extensions `ts` and `tsx` in `moduleFileExtensions`, then `/**/*.ts` and `/**/*.tsx` in `testMatch`. + + +The TypeScript setup is already preconfigured when using the TypeScript starter template. Consider this document as a reference to match your setup. + + + # Migrate to TypeScript If you have an existing Custom Application project and would like to migrate it to TypeScript, you need to do the following: