mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
:chore: some code cleanup
- use readonly for static ids - prefer undefined over null in my code - remove some obsolete todos - do not require Promise from action.run()
This commit is contained in:
@@ -247,7 +247,7 @@ export class CodeApplication extends Disposable {
|
||||
//#endregion
|
||||
|
||||
let macOpenFileURIs: IWindowOpenable[] = [];
|
||||
let runningTimeout: NodeJS.Timeout | null = null;
|
||||
let runningTimeout: NodeJS.Timeout | undefined = undefined;
|
||||
app.on('open-file', (event, path) => {
|
||||
this.logService.trace('app#open-file: ', path);
|
||||
event.preventDefault();
|
||||
@@ -256,9 +256,9 @@ export class CodeApplication extends Disposable {
|
||||
macOpenFileURIs.push(this.getWindowOpenableFromPathSync(path));
|
||||
|
||||
// Clear previous handler if any
|
||||
if (runningTimeout !== null) {
|
||||
if (runningTimeout !== undefined) {
|
||||
clearTimeout(runningTimeout);
|
||||
runningTimeout = null;
|
||||
runningTimeout = undefined;
|
||||
}
|
||||
|
||||
// Handle paths delayed in case more are coming!
|
||||
@@ -272,7 +272,7 @@ export class CodeApplication extends Disposable {
|
||||
});
|
||||
|
||||
macOpenFileURIs = [];
|
||||
runningTimeout = null;
|
||||
runningTimeout = undefined;
|
||||
}, 100);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user