* build: initial TypeScript migration
Add TypeScript as a dev dependency
Configure Babel to handle .ts and .tsx files
Add basic TSConfig for starting type checking
Convert src index file to .ts
* chore: make __ssrPromises mutable in index.d.ts
Change __ssrPromises from const to let in index.d.ts to fix the build error:
SyntaxError: Missing initializer in const declaration
This allows __ssrPromises to be initialized later instead of requiring an initializer when declared.
* feat: add typescript types and interfaces
Add typescript type definitions:
AxiosHooksConfig - configuration options
UseAxiosCache - cache object type
UseAxiosOptions - hook options interface
UseAxiosResponse - custom response type
UseAxiosResult - hook return type
This provides typed interfaces for the different configurations, options, and results when using the hooks. Ensures correct TS usage and enables editor auto-complete.
* test: migrate tests to typescript
Remove JavaScript test files
Convert remaining tests to TypeScript
Update Jest config to only run TS tests
Remove no longer needed type declaration files
Update tests to properly mock axios as a typed mock
Fix minor type errors in tests
Add types to test utilities
This finishes migration of the tests to TypeScript for improved compile time checking and takes full advantage of TypeScript in the tests.