JavaScript mode
JavaScript mode supports several configuration options:
json
which will set the mode to expect JSON data rather than a JavaScript program.jsonld
which will set the mode to expect JSON-LD linked data rather than a JavaScript program (demo).typescript
which will activate additional syntax highlighting and some other things for TypeScript code (demo).statementIndent
which (given a number) will determine the amount of indentation to use for statements continued on a new line.
MIME types defined: text/javascript
, application/json
, application/ld+json
, text/typescript
, application/typescript
.