diff options
author | River Riddle <riddleriver@gmail.com> | 2022-07-05 17:44:43 -0700 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2022-07-07 13:35:53 -0700 |
commit | 0c442776a90da8768527f74ce2403f7a4b112809 (patch) | |
tree | 4018ceb69682d821694a7917c7c755dbff41d691 /mlir/utils | |
parent | 5b32e4755959d6c8ca60ed07c9298f803fc4c3ee (diff) | |
download | llvm-0c442776a90da8768527f74ce2403f7a4b112809.tar.gz |
[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
Diffstat (limited to 'mlir/utils')
-rw-r--r-- | mlir/utils/vscode/src/mlirContext.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/utils/vscode/src/mlirContext.ts b/mlir/utils/vscode/src/mlirContext.ts index 90e5c280f7bb..9bba50e1c0a3 100644 --- a/mlir/utils/vscode/src/mlirContext.ts +++ b/mlir/utils/vscode/src/mlirContext.ts @@ -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(); } }; } |