From 0421179b561d7cd227cbfd55b09b63ca9eeddca6 Mon Sep 17 00:00:00 2001 From: Gidon Date: Wed, 16 Jul 2014 17:04:51 +0300 Subject: [PATCH] Fixed Tests for Typeahead --- typeahead/typeahead-tests.ts | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/typeahead/typeahead-tests.ts b/typeahead/typeahead-tests.ts index 835fbfb57a..aa8a400b64 100644 --- a/typeahead/typeahead-tests.ts +++ b/typeahead/typeahead-tests.ts @@ -6,9 +6,9 @@ // declare var Hogan: string; -var substringMatcher = function (strs) { - return function findMatches(q, cb) { - var matches, substrRegex; +var substringMatcher = function (strs: any) { + return function findMatches(q: any, cb: any) { + var matches: any, substrRegex: any; // an array that will be populated with substring matches matches = []; @@ -52,18 +52,3 @@ $('#the-basics .typeahead').typeahead({ source: substringMatcher(states) }); - -// custom templates -$('#custom-templates .typeahead').typeahead(null, { - name: 'best-pictures', - displayKey: 'value', - source: bestPictures.ttAdapter(), - templates: { - empty: [ - '
', - 'unable to find any Best Picture winners that match the current query', - '
' - ].join('\n'), - suggestion: Handlebars.compile('

{{value}} – {{year}}

') - } -}); \ No newline at end of file