If set (meaning templates.suggestion), this has to be a precompiled template.
Note a precompiled template is a function that takes a JavaScript object as its first argument and returns a HTML string.
But I can implement a function which returns a JQuery or an HTMLElement object and everything seems to work fine. And looking into the code suggests that the returned value can be anything JQuery accepts.
If I am right, would it be possible to update the documentation? Because it probably influences other code (e.g. DefinitelyTyped/typeahead )
Typeahead docs say:
But I can implement a function which returns a JQuery or an HTMLElement object and everything seems to work fine. And looking into the code suggests that the returned value can be anything JQuery accepts.
If I am right, would it be possible to update the documentation? Because it probably influences other code (e.g. DefinitelyTyped/typeahead )