Skip to content

Commit d327d39

Browse files
committed
fix: fix ts
1 parent 57f8d18 commit d327d39

File tree

1 file changed

+4
-1
lines changed
  • packages/monaco-plugin-ob/src/inlineCompletion

1 file changed

+4
-1
lines changed

packages/monaco-plugin-ob/src/inlineCompletion/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MonacoInlineComplete implements monaco.languages.InlineCompletionsProvider
2828
}
2929
const editorValue = model.getValue();
3030
const positionOffset = model.getOffsetAt(position);
31-
return new Promise(async (resolve, reject) => {
31+
return new Promise<monaco.languages.InlineCompletions<monaco.languages.InlineCompletion> | null | undefined>(async (resolve, reject) => {
3232
await new Promise((resolve) => setTimeout(() => resolve(null), 500));
3333
if (version !== this.modelVersion[modelId] || token.isCancellationRequested) {
3434
resolve({
@@ -62,6 +62,9 @@ class MonacoInlineComplete implements monaco.languages.InlineCompletionsProvider
6262
)
6363
}).catch(e => {
6464
console.log('inline completion: ', e)
65+
return {
66+
items: []
67+
}
6568
})
6669
}
6770
}

0 commit comments

Comments
 (0)