xcash / bootstrap-autocomplete

Bootstrap Autocomplete
MIT License
168 stars 72 forks source link

Documentation has a possibly errant question mark #57

Closed realuser closed 4 years ago

realuser commented 4 years ago

Describe the bug In the documentation, https://bootstrap-autocomplete.readthedocs.io/en/latest/ under the Configuration Options section the example code shows:

Returns: | An object { id: myItemId, text: myfancyText, html?: myfancierHtml }.

Is the question mark after the html key a typo or intentional? I assumed it was a typo and my code seems to work with out it.

Screenshots image

JanStorm commented 4 years ago

I think thats intentional to show for documentation purposes that the property is optional.

xcash commented 4 years ago

Hi @realuser @nws-jstorm is right. As the library is developed in TypeScript I used the same syntax to represent optional parameters. In that example the returned object must have id and text while html is used only if defined.