forked from buefy/buefy
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): rewrite SidebarSearch in TS (#389)
Rewrites `src/components/SidebarSearch.vue` in TypeScript: - Introduces new interfaces: - `SearchResult`: type of an entry in search results - `IndexedSearchResult`: type of an entry in sorted search results - `SearchResultsSection`: group of search results - The `sortedResults` computed generates new objects with `map` rather than replacing results in place with `forEach` so that no type error occurs A tip for TypeScript migration: - Explicitly import and register Buefy components so that they are type-checked. Note that no type-checking is performed for globally registered components.
- Loading branch information
Showing
1 changed file
with
56 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters