Skip to content

Commit 511b81d

Browse files
authored
docs: add note about resolveJsonModule for TS (cucumber#1663)
1 parent 030075d commit 511b81d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/cli.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ If your files end with an extension other than `js`, make sure to also include t
180180
--require-module coffeescript/register --require 'features/**/*.coffee'
181181
```
182182

183-
### Typescript
183+
### TypeScript
184+
185+
Your `tsconfig.json` should have the `resolveJsonModule` compiler option switched on. Other than that, a pretty standard TypeScript setup should work as expected.
184186

185187
#### With ts-node
186188

@@ -211,6 +213,7 @@ require('ts-node').register({
211213
transpileOnly: true,
212214
compilerOptions: {
213215
"module": "commonjs",
216+
"resolveJsonModule": true,
214217
},
215218
});
216219
```

docs/migration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ There are a few minor differences to be aware of:
4848

4949
- The type for data tables was named `TableDefinition` - it's now named `DataTable`
5050
- `World` was typed as an interface, but it's actually a class - you should `extend` it when [building a custom formatter](./custom_formatters.md)
51+
52+
Also, your `tsconfig.json` should have the `resolveJsonModule` compiler option switched on. Other than that, a pretty standard TypeScript setup should work as expected.

0 commit comments

Comments
 (0)