1. 25 Apr, 2022 16 commits
  2. 22 Apr, 2022 2 commits
    • Robert Knight's avatar
      Simplify some comments · d5dcced6
      Robert Knight authored
      The reference to "config fragment" may be unclear here, so just leave it
      out. Someone interested in the details of how configuration is passed to
      applications on launch can read the code that uses this config type.
      d5dcced6
    • Robert Knight's avatar
      Refine types of `config` parameters in annotator code · d333f326
      Robert Knight authored
      Various functions and constructors in the annotator code accepted a `config`
      parameter with an uninformative `Record<string, any>` type.  Replace these types
      with more specific ones that specify required / known optional properties
      directly and use `Record<string, unknown>` for properties which are forwarded to
      other contexts.
      
      Also improve the documentation for the `getConfig` function which serves
      as the entry point for reading configuration in the annotator.
      d333f326
  3. 21 Apr, 2022 20 commits
  4. 20 Apr, 2022 2 commits
    • Robert Knight's avatar
      Remove an incorrect `RouteMap|RouteMetadata => RouteMap` cast · f9bb654a
      Robert Knight authored
      When traversing the RouteMap there are three possibilities:
      
       - There is no route that matches the path segment
      
       - There is a child `RouteMap` that matches the path segment
      
       - There is a child `RouteMetadata` that matches the path segment, in
         which case we should only return it if we reached the end of the path
      
      Rewrite `findRouteMetadata` to handle these possibilities more
      explicitly. We already had tests that covered the expected behavior,
      this rewrite just avoid a cast which is technically incorrect.
      f9bb654a
    • Robert Knight's avatar
      Make sidebar/services typecheck with `noImplicitAny` · 5cfa841c
      Robert Knight authored
      Fix remaining errors needed to make this directory typecheck with
      `noImplicitAny`.
      
       - Add missing types
      
       - Use `Object.entries` instead of `for..in` for record iteration in
         several places. Add an `entries` utility to make iteration over
         `Record<Key, Value>` types more convenient where `Key` is more
         specific than just a string.
      
       - Change localStorage fallback to use a Map rather than object for
         temporary data storage
      5cfa841c