However, the documentation states that suggestions can take the shape of an array of sections. But if you assume a section is a TSuggestion, then none of the other methods work as they think a section is actually a suggestion.
You should make this type definition: suggestions: any[] to support sections, or make a new prop specifically for sections.
in https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-autosuggest/index.d.ts
The suggestions prop is defined as:
suggestions: TSuggestion[];
However, the documentation states that suggestions can take the shape of an array of sections. But if you assume a section is a TSuggestion, then none of the other methods work as they think a section is actually a suggestion.
You should make this type definition:
suggestions: any[]
to support sections, or make a new prop specifically for sections.