Skip to content

Commit 7705ce7

Browse files
authoredJun 27, 2020
Add ts support (#573)
1 parent d1307f1 commit 7705ce7

File tree

5 files changed

+152
-281
lines changed

5 files changed

+152
-281
lines changed
 

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
122122
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
123123
| `leetcode.hideSolved` | Specify to hide the solved problems or not | `false` |
124124
| `leetcode.showLocked` | Specify to show the locked problems or not. Only Premium users could open the locked problems | `false` |
125-
| `leetcode.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `bash`, `c`, `cpp`, `csharp`, `golang`, `java`, `javascript`, `kotlin`, `mysql`, `php`, `python`,`python3`,`ruby`,`rust`, `scala`,`swift` | `N/A` |
125+
| `leetcode.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `bash`, `c`, `cpp`, `csharp`, `golang`, `java`, `javascript`, `kotlin`, `mysql`, `php`, `python`,`python3`,`ruby`,`rust`, `scala`, `swift`, `typescript` | `N/A` |
126126
| `leetcode.useWsl` | Specify whether to use WSL or not | `false` |
127127
| `leetcode.endpoint` | Specify the active endpoint. Supported endpoints are: `leetcode`, `leetcode-cn` | `leetcode` |
128128
| `leetcode.workspaceFolder` | Specify the path of the workspace folder to store the problem files. | `""` |

‎docs/README_zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
124124
| `leetcode.hideSolved` | 指定是否要隐藏已解决的问题 | `false` |
125125
| `leetcode.showLocked` | 指定是否显示付费题目,只有付费账户才可以打开付费题目 | `false` |
126-
| `leetcode.defaultLanguage` | 指定答题时使用的默认语言,可选语言有:`bash`, `c`, `cpp`, `csharp`, `golang`, `java`, `javascript`, `kotlin`, `mysql`, `php`, `python`,`python3`,`ruby`, `rust`, `scala`,`swift` | `N/A` |
126+
| `leetcode.defaultLanguage` | 指定答题时使用的默认语言,可选语言有:`bash`, `c`, `cpp`, `csharp`, `golang`, `java`, `javascript`, `kotlin`, `mysql`, `php`, `python`,`python3`,`ruby`, `rust`, `scala`, `swift`, `typescript` | `N/A` |
127127
| `leetcode.useWsl` | 指定是否启用 WSL | `false` |
128128
| `leetcode.endpoint` | 指定使用的终端,可用终端有:`leetcode`, `leetcode-cn` | `leetcode` |
129129
| `leetcode.workspaceFolder` | 指定保存文件的工作区目录 | `""` |

‎package-lock.json

Lines changed: 145 additions & 277 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@
295295
"ruby",
296296
"rust",
297297
"scala",
298-
"swift"
298+
"swift",
299+
"typescript"
299300
],
300301
"scope": "application",
301302
"description": "Default language for solving the problems."
@@ -675,6 +676,6 @@
675676
"markdown-it": "^8.4.2",
676677
"require-from-string": "^2.0.2",
677678
"unescape-js": "^1.1.1",
678-
"vsc-leetcode-cli": "2.6.23"
679+
"vsc-leetcode-cli": "2.7.0"
679680
}
680681
}

‎src/shared.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const languages: string[] = [
3636
"rust",
3737
"scala",
3838
"swift",
39+
"typescript",
3940
];
4041

4142
export const langExt: Map<string, string> = new Map([
@@ -55,6 +56,7 @@ export const langExt: Map<string, string> = new Map([
5556
["rust", "rs"],
5657
["scala", "scala"],
5758
["swift", "swift"],
59+
["typescript", "ts"],
5860
]);
5961

6062
export enum ProblemState {

0 commit comments

Comments
 (0)
Please sign in to comment.