Skip to content

Commit d751f90

Browse files
committed
Add docs on setting user preferences in tsconfig
1 parent b96dd33 commit d751f90

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/advanced.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,27 @@ Atom-TypeScript needs to decide what SDK it should use for each new opened TypeS
1717
3. Use the bundled TypeScript SDK.
1818

1919
Note that the result is memoized, so if you change path to SDK (using any method) when Atom-TypeScript is running, you'll need to restart Atom for changes to take effect.
20+
21+
# Specifying tsserver user preferences via `tsconfig.json`
22+
23+
You can find the full list of user preference options with descriptions in the [TypeScript sources](https://github.com/microsoft/TypeScript/blob/68925b66f4e7eb4ef6081cdc7a0f05a0bd874171/lib/protocol.d.ts#L2422). Note this is a link to a particular commit. The list might've changed since this was written, check the relevant tag as well.
24+
25+
The following options are configurable via Atom-TypeScript settings:
26+
27+
* `importModuleSpecifierEnding`
28+
* `importModuleSpecifierPreference`
29+
* `quotePreference`
30+
* `includeCompletionsForModuleExports` (experimental)
31+
32+
Additionally, these (and other) options can be configured in `tsconfig.json` by adding `preferences` property to the top-level JSON object, e.g.
33+
34+
```json
35+
{
36+
"compilerOptions": {},
37+
"preferences": {
38+
"quotePreference": "double"
39+
}
40+
}
41+
```
42+
43+
Not all of these are supported by all TypeScript versions. Setting some options can also break things, so tread carefully.

0 commit comments

Comments
 (0)