Add docs and tests on typeahead