Commit bd52689
authored
docs: add missing package.json "type": "module" step to TypeScript install guide
The TypeScript setup section provides a tsconfig.json using "module": "nodenext" and demonstrates ESM import syntax in src/app.ts, but doesn't mention that package.json also needs "type": "module" set. Without it, TypeScript treats .ts files as CommonJS by default and throws ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. (ts1295) when following the guide as written. This adds the missing step so the example works out of the box.
Signed-off-by: Jameel Ahmad <jameelahmad221b@gmail.com>1 parent f118e03 commit bd52689
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
55 | 74 | | |
56 | 75 | | |
57 | 76 | | |
| |||
0 commit comments