[mlir-vscode] Explicitly set the return type for didOpen

In the newer versions of the language client, this explicitly expects a
Promise<void> return type, otherwise it errors out.

Fixes #56297

Differential Revision: https://reviews.llvm.org/D129181
This commit is contained in:
River Riddle 2022-07-05 17:44:43 -07:00
parent 5b32e47559
commit 0c442776a9
1 changed files with 3 additions and 2 deletions

View File

@ -251,10 +251,11 @@ export class MLIRContext implements vscode.Disposable {
let middleware = {};
if (!workspaceFolder) {
middleware = {
didOpen : (document, next) => {
didOpen : (document, next) : Promise<void> => {
if (!vscode.workspace.getWorkspaceFolder(document.uri)) {
next(document);
return next(document);
}
return Promise.resolve();
}
};
}