• Robert Knight's avatar
    Make sidebar/config/ typecheck with `noImplicitAny` · e847bc40
    Robert Knight authored
    Add and improve types in src/sidebar/config/ so that this directory
    typechecks with `noImplicitAny` enabled.
    
     - Add "$rpc:requestGroups" as a possible value for the `groups` config
       in types/config.js, which code in sidebar/config/ needs to replace
       with a promise for a list of groups.
    
       This required a change in `sidebar/services/groups.js` to either
       check for or explicitly assert that `service.groups` is an array at
       this point (and not the string "$rpc:requestGroups").
    
     - Replace various `object` types with `ConfigFromHost`,
       `ConfigFromSidebar` or `SidebarSettings` as appropriate
    
     - Rewrite the code at the bottom of `hostPageConfig` that copies
       configuration from the `config=` URL fragment into a sanitized
       `ConfigFromHost` object, so that it is easier to read and add types
       to.
    e847bc40
config-fragment.js 1001 Bytes