tsc:allowUnreachableCode, eslint:no-unreachable, assert->assertDev
This commit is contained in:
parent
f627a05cf8
commit
eb10aafd7c
57 changed files with 213 additions and 176 deletions
|
@ -16,7 +16,7 @@ import {
|
|||
import type { QuotedMessageType } from '../model-types.d';
|
||||
import type { ConversationModel } from '../models/conversations';
|
||||
import { GLOBAL_ZONE } from '../SignalProtocolStore';
|
||||
import { assert, strictAssert } from '../util/assert';
|
||||
import { assertDev, strictAssert } from '../util/assert';
|
||||
import { parseIntOrThrow } from '../util/parseIntOrThrow';
|
||||
import { Address } from '../types/Address';
|
||||
import { QualifiedAddress } from '../types/QualifiedAddress';
|
||||
|
@ -673,7 +673,7 @@ export default class MessageSender {
|
|||
Pick<AttachmentType, 'data' | 'size' | 'contentType'>
|
||||
>
|
||||
): Promise<Proto.IAttachmentPointer> {
|
||||
assert(
|
||||
assertDev(
|
||||
typeof attachment === 'object' && attachment != null,
|
||||
'Got null attachment in `makeAttachmentPointer`'
|
||||
);
|
||||
|
@ -1300,7 +1300,7 @@ export default class MessageSender {
|
|||
timestamp: number;
|
||||
urgent: boolean;
|
||||
}>): Promise<CallbackResultType> {
|
||||
assert(identifier, "Identifier can't be undefined");
|
||||
assertDev(identifier, "Identifier can't be undefined");
|
||||
return new Promise((resolve, reject) => {
|
||||
const callback = (res: CallbackResultType) => {
|
||||
if (res && res.errors && res.errors.length > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue