Marking a bunch of static variables as readonly

Readonly helps out with TS's type guards and is also a good best practice. Specifically, readonly strings/numbers have their literal type instead of a generic `string` | `number` type, which can help catch dead code and some common programming mistakes
This commit is contained in:
Matt Bierner
2019-10-07 15:39:21 -07:00
parent 90f33ddc6d
commit b0dccbcf75
90 changed files with 217 additions and 217 deletions

View File

@@ -166,8 +166,8 @@ interface TreeNode extends IDisposable {
class ExtHostTreeView<T> extends Disposable {
private static LABEL_HANDLE_PREFIX = '0';
private static ID_HANDLE_PREFIX = '1';
private static readonly LABEL_HANDLE_PREFIX = '0';
private static readonly ID_HANDLE_PREFIX = '1';
private readonly dataProvider: vscode.TreeDataProvider<T>;