fix: Add type for async items on suggestions (fix TS strict types complaining) (#1912)

This commit is contained in:
Ruben Robles 2021-09-20 11:02:40 +02:00 committed by GitHub
parent cc586ce036
commit 4a6c3cbaac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ export interface SuggestionOptions {
range: Range, range: Range,
props: any, props: any,
}) => void, }) => void,
items?: (query: string) => any[], items?: (query: string) => any[] | Promise<any[]>,
render?: () => { render?: () => {
onStart?: (props: SuggestionProps) => void, onStart?: (props: SuggestionProps) => void,
onUpdate?: (props: SuggestionProps) => void, onUpdate?: (props: SuggestionProps) => void,