• Robert Knight's avatar
    Make APIService typecheck with `noImplicitAny` · 2ac4d66f
    Robert Knight authored
     - Rewrite route metadata lookup so TS can understand it better, and to
       explicitly handle the case where an expected route is not found in
       the `/api/` response. We don't expect this to happen in normal
       usage but it would provide a more obvious error if eg. something
       intercepted the `/api/` request or a modified fork of h removes a
       route that the client needs.
    
     - Rewrite `stripInternalProperties` helper to use `Object.entries`
       rather than a `for..in` loop
    
     - Set the default type to `void` for request and response bodies (ie.
       assume no request/response body unless specified).
    
     - Adjust types and casts for APICall. To typecheck with `noImplicitAny`
       we need to cast the generic `APICall<...>` to the type for a specific
       route.
    2ac4d66f
Name
Last commit
Last update
..
annotator Loading commit data...
boot Loading commit data...
images/icons Loading commit data...
shared Loading commit data...
sidebar Loading commit data...
styles Loading commit data...
test-util Loading commit data...
types Loading commit data...
.eslintrc Loading commit data...
karma.config.js Loading commit data...
tsconfig.json Loading commit data...
tsconfig.no-any.json Loading commit data...