Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3370468
D9701.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9701.diff
View Options
diff --git a/lib/permissions/minimally-encoded-thread-permissions.js b/lib/permissions/minimally-encoded-thread-permissions.js
--- a/lib/permissions/minimally-encoded-thread-permissions.js
+++ b/lib/permissions/minimally-encoded-thread-permissions.js
@@ -21,8 +21,6 @@
// If more than 64 permissions are needed, the encoding in
// `rolePermissionToBitmaskHex` will need to be updated to accommodate this.
const baseRolePermissionEncoding = Object.freeze({
- // TODO (atul): Update flow to `194.0.0` for bigint support
- // $FlowIssue bigint-unsupported
know_of: BigInt(0),
visible: BigInt(1),
voiced: BigInt(2),
@@ -68,8 +66,6 @@
for (const [key, permission] of entries(permissions)) {
if (permission.value && key in minimallyEncodedThreadPermissions) {
invariant(
- // TODO (atul): Update flow to `194.0.0` for bigint support
- // $FlowIssue illegal-typeof
typeof minimallyEncodedThreadPermissions[key] === 'bigint',
'must be bigint',
);
@@ -116,8 +112,6 @@
const knowOfBitmask =
minimallyEncodedThreadPermissions[threadPermissions.KNOW_OF];
invariant(
- // TODO (atul): Update flow to `194.0.0` for bigint support
- // $FlowIssue illegal-typeof
typeof permissionBitmask === 'bigint',
'permissionBitmask must be of type bigint',
);
@@ -166,11 +160,9 @@
baseRolePermissionEncoding,
);
-// $FlowIssue bigint-unsupported
const inversePropagationPrefixes: Map<bigint, string> =
invertObjectToMap(propagationPrefixes);
-// $FlowIssue bigint-unsupported
const inverseFilterPrefixes: Map<bigint, string> =
invertObjectToMap(filterPrefixes);
diff --git a/lib/utils/objects.test.js b/lib/utils/objects.test.js
--- a/lib/utils/objects.test.js
+++ b/lib/utils/objects.test.js
@@ -128,15 +128,11 @@
it('should invert an object with BigInt values to map with BigInt keys', () => {
const obj = {
- // $FlowIssue bigint-unsupported
key1: 1n,
- // $FlowIssue bigint-unsupported
key2: 2n,
};
const map = new Map();
- // $FlowIssue bigint-unsupported
map.set(1n, 'key1');
- // $FlowIssue bigint-unsupported
map.set(2n, 'key2');
expect(invertObjectToMap(obj)).toEqual(map);
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 2:48 AM (20 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2586287
Default Alt Text
D9701.diff (2 KB)
Attached To
Mode
D9701: [Flow202][lib][skip-ci] [9/23] Get rid of BigInt $FlowIssues
Attached
Detach File
Event Timeline
Log In to Comment