mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Adding more explicit typings for TS 4.1 new Promise logic
This commit is contained in:
@@ -57,7 +57,7 @@ async function splitEditor() {
|
||||
}
|
||||
|
||||
async function saveFileAndCloseAll(resource: vscode.Uri) {
|
||||
const documentClosed = new Promise((resolve, _reject) => {
|
||||
const documentClosed = new Promise<void>((resolve, _reject) => {
|
||||
const d = vscode.notebook.onDidCloseNotebookDocument(e => {
|
||||
if (e.uri.toString() === resource.toString()) {
|
||||
d.dispose();
|
||||
@@ -71,7 +71,7 @@ async function saveFileAndCloseAll(resource: vscode.Uri) {
|
||||
}
|
||||
|
||||
async function saveAllFilesAndCloseAll(resource: vscode.Uri | undefined) {
|
||||
const documentClosed = new Promise((resolve, _reject) => {
|
||||
const documentClosed = new Promise<void>((resolve, _reject) => {
|
||||
if (!resource) {
|
||||
return resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user