Page MenuHomePhabricator

[lib] Split thread-types
ClosedPublic

Authored by michal on May 10 2023, 9:49 AM.
Tags
None
Referenced Files
F3387274: D7783.id26356.diff
Fri, Nov 29, 8:34 AM
F3387235: D7783.id26457.diff
Fri, Nov 29, 8:24 AM
F3387227: D7783.id26444.diff
Fri, Nov 29, 8:21 AM
F3387174: D7783.id26358.diff
Fri, Nov 29, 8:03 AM
Unknown Object (File)
Mon, Nov 25, 6:17 PM
Unknown Object (File)
Sat, Nov 23, 3:18 AM
Unknown Object (File)
Wed, Nov 6, 10:04 PM
Unknown Object (File)
Oct 28 2024, 8:57 AM
Subscribers

Details

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.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Remove unnecessary changes

Accepting to save you rebasing

lib/types/thread-permission-types.js
1 ↗(On Diff #26358)

Add a newline here

This revision is now accepted and ready to land.May 12 2023, 2:12 AM