Axios wrapper with TypeScript typings for consuming RESTyped API definitions. Version 2.0.0 requires TypeScript 2.8+. Enforces type-safe HTTP requests: route paths, query parameters, request bodies, and responses are checked at compile time against a provided RESTyped interface. Differentiates from raw Axios by eliminating runtime errors from mismatched endpoints. Low release cadence; stable for RESTyped ecosystem.
npm install restyped-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a typed Axios client with RESTyped API definition and making a request with typed params.
Update TypeScript to 2.8+ or use restyped-axios@1.x for TS 2.4-2.7.
Use client.request({ url, params }) instead of client.get(url, { params }).Use client.post<'/posts/:id/like'>('/posts/3/like') instead of plain call.Lock axios to version ^0.27.0 or check compatibility.
Add explicit generic: client.post<'/posts/:id/like'>('/posts/3/like')Check the route exists in the API definition and parameters match the expected types.
Run npm install restyped-axios and ensure tsconfig.json includes node_modules type resolution.