• Robert Knight's avatar
    Enable typechecking for sidebar/store/modules · 2501a772
    Robert Knight authored
    - Add JSDoc for the `actionTypes` function. This uses an advanced
      TS feature called "mapped types" [1] to specify that the result is an
      object with the same keys as the input object, but where the values
      are strings rather than functions.
    
      Going forwards there are likely better ways to replace `actionTypes`.
      The original purpose was to make sure that the `type` field of each action
      object matches up with a key of the `updates` object.
    
    - Fix various existing JSDoc errors
    - Add imports for the existing `Group` and `Annotation` references
    - Add missing `group` property to `Annotation` type
    
    [1] https://www.typescriptlang.org/docs/handbook/advanced-types.html#mapped-types
        (See in particular the `in keyof T` mentions).
    2501a772
viewer.js 1.41 KB