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

@@ -103,10 +103,10 @@ class LocalStorageCredentialsProvider implements ICredentialsProvider {
class PollingURLCallbackProvider extends Disposable implements IURLCallbackProvider {
static FETCH_INTERVAL = 500; // fetch every 500ms
static FETCH_TIMEOUT = 5 * 60 * 1000; // ...but stop after 5min
static readonly FETCH_INTERVAL = 500; // fetch every 500ms
static readonly FETCH_TIMEOUT = 5 * 60 * 1000; // ...but stop after 5min
static QUERY_KEYS = {
static readonly QUERY_KEYS = {
REQUEST_ID: 'vscode-requestId',
SCHEME: 'vscode-scheme',
AUTHORITY: 'vscode-authority',