• Robert Knight's avatar
    Add missing types for PortRPC method handlers · 9ea1e6d7
    Robert Knight authored
    Previously the arguments of the callback passed to `PortRPC.on` were
    inferred as `any`. Make the callback type generic so that the caller is
    forced to specify what types the arguments have.
    
    Internally within PortRPC, use `unknown` rather than `any` for RPC
    method arguments where possible.
    
    Note that this change does not ensure that an RPC method is called (via `call`)
    using arguments of the same types that the handler expects, but at least it is
    now easier to check that the `call` and `on` uses match up and that arguments
    are typed within the handler.
    9ea1e6d7
Name
Last commit
Last update
..
messaging Loading commit data...
test Loading commit data...
config-fragment.js Loading commit data...
frame-error-capture.js Loading commit data...
injector.js Loading commit data...
keyboard-navigation.js Loading commit data...
listener-collection.js Loading commit data...
presentational-component.js Loading commit data...
prompts.js Loading commit data...
random.js Loading commit data...
renderer-options.js Loading commit data...
shortcut.js Loading commit data...
type-coercions.js Loading commit data...
user-agent.js Loading commit data...
warn-once.js Loading commit data...