-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mmigrate APIHooks and DataService to TypeScript (#1214)
* Migrate DataService to TypeScript. This takes a shortcut by using `any` in many of the type signatures. There's not much we can really do about this, since most of these functions are generic and either call `JSON.stringify()` on an arguments or `resp.json()` on responses. For better type safety, we probably want the wrapper functions that call these ones to have stricter type annotations. * Migrate APIHooks to TypeScript. These use type assertions on the API responses, since we do not do any runtime validation of data coming from the API. This also fixes a bug in the ServiceDiscoveryResults type signatures, where it was expecting a type of CategoryRefinement, but in reality we only had the data from a Category (no Algolia-specific data in it).
- Loading branch information
1 parent
9ec071a
commit 607db76
Showing
6 changed files
with
36 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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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