HomePhabricator
Diffusion Comm 29bf7fc8253b

[lib] Split thread-types

Description

[lib] Split thread-types

Summary:
Splits thread-types.js into two files: thread-permission-types.js and `thread-types-enum.js. It's done for the same reason as when we extracted the message enum - to remove a dependency cycle (that would be otherwise introduced in the next diffs).

There's one small additional change: validators in thread-types-enum.js now have to be explicitly annotated (because they are now imported across files), and this required changing the flow type of tcomb.dict() function to accept string literal unions/enums and not just strings.

Depends on D7749

Test Plan: Run yarn jest-all and yarn flow-all. Check if web and landing work.

Reviewers: kamil, tomek, ashoat

Reviewed By: ashoat

Subscribers: ashoat, atul

Differential Revision: https://phab.comm.dev/D7783

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on May 9 2023, 6:10 AM
Reviewer
ashoat
Differential Revision
D7783: [lib] Split thread-types
Parents
rCOMMd5d2636c589e: [keyserver] Convert websocket input
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM29bf7fc8253b: [lib] Split thread-types (authored by Michal Gniadek <michal.gniadek@swmansion.com>).May 15 2023, 4:49 AM