tsc:allowUnreachableCode, eslint:no-unreachable, assert->assertDev

This commit is contained in:
Jamie Kyle 2022-09-15 12:17:15 -07:00 committed by GitHub
parent f627a05cf8
commit eb10aafd7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 213 additions and 176 deletions

View file

@ -5,7 +5,7 @@ import Long from 'long';
import { ReceiptCredentialPresentation } from '@signalapp/libsignal-client/zkgroup';
import { isNumber } from 'lodash';
import { assert, strictAssert } from '../util/assert';
import { assertDev, strictAssert } from '../util/assert';
import { dropNull, shallowDropNull } from '../util/dropNull';
import { SignalService as Proto } from '../protobuf';
import { deriveGroupFields } from '../groups';
@ -331,7 +331,7 @@ export async function processDataMessage(
isExpirationTimerUpdate,
isProfileKeyUpdate,
].filter(Boolean).length;
assert(
assertDev(
flagCount <= 1,
`Expected exactly <=1 flags to be set, but got ${flagCount}`
);