Commit 39eeedd
committed
Part 1 - Include Typescript configuration
# tsconfig.json
This file is where the compilation options are set.
Some important points to highlight:
- In this example, I've set the code to be transformed from "es2017" into "commonjs".
- The module resolution strategy chosen was "node". For older versions of typescript (1.5 and under), the mode would be "classic".
- experimentalDecorators is set to true because this is a requirement for the upcoming vue typescript decorators. A crucial library for us to have strongly typed Vue components.
- The "include" key is only referencing which files should the typescript transpiler pay attention to.
- Every other option chosen is a matter of personal preference on how strict you want your Typescript experience to be.
# global-declares.d.ts
- Typescript requires imports to reference modules. This file is just informing typescript that whatever import referencing a .vue file, should be understood as a Vue object.1 parent ed4895c commit 39eeedd
2 files changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments