You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -206,9 +199,9 @@ At first, install `typia` as dependency. And then, install `typescript`, `ts-pat
206
199
}
207
200
```
208
201
209
-
At second, open your `tsconfig.json` file and configure like above.
202
+
Secondly open your `tsconfig.json` file as shown above.
210
203
211
-
As `typia` generates optimal operation code through transformation, you've to configure it as a `plugin`. Also, never forget to configure `strict` (or `strictNullChecks`) to be `true`. It is essential option for modern TypeScript development.
204
+
As `typia` generates optimal operation code through transformation, it must be configured as a `plugin`. Also, never forget to configure `strict` (or `strictNullChecks`) to be `true` within your tsconfig.json `compilerOptions`. It is essential option for modern TypeScript development.
At last, open `package.json` file and configure `npm run prepare` command like above.
241
+
Finally open `package.json` file and configure `npm run prepare` command like above.
249
242
250
-
Of course, you've to run the `npm run prepare`command after the configuration.
243
+
Be sure to run `npm run prepare`once you have made these changes
251
244
252
245
For reference, [`ts-patch`](https://github.com/nonara/ts-patch) is an helper library of TypeScript compiler that supporting custom transformations by plugins. From now on, whenever you run `tsc` command, your `typia` function call statements would be transformed to the optimal operation codes in the compiled JavaScript files.
253
246
@@ -313,17 +306,19 @@ yarn typia generate \
313
306
314
307
For frontend projects.
315
308
316
-
If you're using non-standard TypeScript compiler, you can't use [transform mode](#transformation)
309
+
If you are using a non-standard TypeScript compiler such as the following, you will need to fall back to [generation](#generation) mode
317
310
318
311
- Non-standard TypeScript compilers:
319
312
-[SWC](https://swc.rs/) in Next.JS
320
313
-[ESBuild](https://esbuild.github.io/) in Vite
321
314
-[Babel](https://babeljs.io/) in Create-React-App
322
315
323
-
Instead, you should utilize the generation mode.
316
+
Instead you should utilise the generation mode.
324
317
325
318
Install `typia` through `npm install` command, and run `typia generate` command. Then, generator of `typia` reads your TypeScript codes of `--input`, and writes transformed TypeScript files into the `--output` directory, like below.
326
319
320
+
For clarification, the input directory should contain one or more TypeScript files which define how you want to verify your associated type assertions. Commonly you will import your TypeScript type, then export a function which validates that type. See below.
321
+
327
322
If you want to specify other TypeScript project file instead of `tsconfig.json`, you can use `--project` option.
0 commit comments