Page MenuHomePhorge

D9701.1768972714.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D9701.1768972714.diff

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
@@ -16,8 +16,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),
@@ -62,8 +60,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',
);
@@ -83,8 +79,6 @@
}
const permissionBitmask = minimallyEncodedThreadPermissions[permission];
invariant(
- // TODO (atul): Update flow to `194.0.0` for bigint support
- // $FlowIssue illegal-typeof
typeof permissionBitmask === 'bigint',
'permissionBitmask must be of type bigint',
);
@@ -130,11 +124,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

Mime Type
text/plain
Expires
Wed, Jan 21, 5:18 AM (14 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5960805
Default Alt Text
D9701.1768972714.diff (2 KB)

Event Timeline