diff --git a/docs/examples/autocomplete/autocomplete-template.vue b/docs/examples/autocomplete/autocomplete-template.vue index 326925ef4249c..db1c1bdacad9b 100644 --- a/docs/examples/autocomplete/autocomplete-template.vue +++ b/docs/examples/autocomplete/autocomplete-template.vue @@ -37,8 +37,8 @@ const querySearch = (queryString: string, cb) => { // call callback function to return suggestion objects cb(results) } -const createFilter = (queryString) => { - return (restaurant) => { +const createFilter = (queryString: string) => { + return (restaurant: LinkItem) => { return ( restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0 ) @@ -55,7 +55,7 @@ const loadAll = () => { { value: 'babel', link: 'https://github.com/babel/babel' }, ] } -const handleSelect = (item: LinkItem) => { +const handleSelect = (item: Record) => { console.log(item) } diff --git a/docs/examples/autocomplete/autocomplete.vue b/docs/examples/autocomplete/autocomplete.vue index 0f00a73b6c8e1..3d8840426dee7 100644 --- a/docs/examples/autocomplete/autocomplete.vue +++ b/docs/examples/autocomplete/autocomplete.vue @@ -68,7 +68,7 @@ const loadAll = () => { ] } -const handleSelect = (item: RestaurantItem) => { +const handleSelect = (item: Record) => { console.log(item) }