Skip to content

Commit d076592

Browse files
committed
Merge branch 'typescript-docs'
2 parents f6d66ec + 057637a commit d076592

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,30 @@ These extensions go beyond the base JavaScript syntax to support third-party fea
9494

9595
Highlight [JSX](https://reactjs.org/docs/introducing-jsx.html).
9696

97+
#### `typescript`: boolean (**Beta**)
98+
99+
Highlight [TypeScript](http://typescriptlang.org). TypeScript support is currently in beta, meaning that there may be bugs and that the exact behavior is subject to change.
100+
101+
By default, old-style type assertions (e.g. `<T>foo`) are not highlighted. You can enable them via the `typescript.old_style_assertions` option. As an example, these user preferences will provide configurations for both plain TypeScript and TypeScript with JSX:
102+
103+
```json
104+
{
105+
"configurations": {
106+
"TypeScript": {
107+
"file_extensions": [ "ts" ],
108+
"typescript": {
109+
"old_style_assertions": true
110+
},
111+
},
112+
"TypeScript (JSX)": {
113+
"file_extensions": [ "tsx" ],
114+
"typescript": true,
115+
"jsx": true
116+
}
117+
}
118+
}
119+
```
120+
97121
#### `flow_types`: boolean
98122

99123
Highlight [Flow type annotations](https://flow.org/en/docs/types/).

0 commit comments

Comments
 (0)