• 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
..
components Loading commit data...
config Loading commit data...
helpers Loading commit data...
services Loading commit data...
store Loading commit data...
test Loading commit data...
util Loading commit data...
cross-origin-rpc.js Loading commit data...
icons.js Loading commit data...
index.js Loading commit data...
markdown-commands.js Loading commit data...
media-embedder.js Loading commit data...
render-markdown.js Loading commit data...
search-client.js Loading commit data...
service-context.js Loading commit data...
websocket.js Loading commit data...