Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Add support for TypeScript #13250

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/extensions/default/JavaScriptCodeHints/HintUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ define(function (require, exports, module) {
var Acorn = require("node_modules/acorn/dist/acorn");

var LANGUAGE_ID = "javascript",
TYPESCRIPT_LANGUAGE_ID = "typescript",
JSX_LANGUAGE_ID = "jsx",
HTML_LANGUAGE_ID = "html",
PHP_LANGUAGE_ID = "php",
SUPPORTED_LANGUAGES = [LANGUAGE_ID, JSX_LANGUAGE_ID, HTML_LANGUAGE_ID, PHP_LANGUAGE_ID],
SUPPORTED_LANGUAGES = [LANGUAGE_ID, TYPESCRIPT_LANGUAGE_ID, JSX_LANGUAGE_ID, HTML_LANGUAGE_ID, PHP_LANGUAGE_ID],
SINGLE_QUOTE = "'",
DOUBLE_QUOTE = "\"";

Expand Down
8 changes: 8 additions & 0 deletions src/language/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@
"lineComment": ["//"]
},

"typescript": {
"name": "TypeScript",
"mode": ["javascript", "application/typescript"],
"fileExtensions": ["ts"],
"blockComment": ["/*", "*/"],
"lineComment": ["//"]
},

"jsx": {
"name": "JSX",
"mode": "jsx",
Expand Down