mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
remove some anys (#271651)
This commit is contained in:
committed by
GitHub
parent
3a8f6b3483
commit
cee904f80c
@@ -179,9 +179,9 @@ async function startClientWithParticipants(languageParticipants: LanguagePartici
|
||||
}
|
||||
return r;
|
||||
}
|
||||
// eslint-disable-next-line local/code-no-any-casts
|
||||
const isThenable = <T>(obj: ProviderResult<T>): obj is Thenable<T> => obj && (<any>obj)['then'];
|
||||
|
||||
function isThenable<T>(obj: unknown): obj is Thenable<T> {
|
||||
return !!obj && typeof (obj as unknown as Thenable<T>).then === 'function';
|
||||
}
|
||||
const r = next(document, position, context, token);
|
||||
if (isThenable<CompletionItem[] | CompletionList | null | undefined>(r)) {
|
||||
return r.then(updateProposals);
|
||||
|
||||
Reference in New Issue
Block a user