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
57 changed files with 213 additions and 176 deletions

View File

@@ -18,7 +18,7 @@ import { v4 as getGuid } from 'uuid';
import { z } from 'zod';
import type { Readable } from 'stream';
import { assert, strictAssert } from '../util/assert';
import { assertDev, strictAssert } from '../util/assert';
import { isRecord } from '../util/isRecord';
import * as durations from '../util/durations';
import type { ExplodePromiseResultType } from '../util/explodePromise';
@@ -391,7 +391,7 @@ async function _promiseAjax(
log.info(logId, response.status, 'Success');
if (options.responseType === 'byteswithdetails') {
assert(result instanceof Uint8Array, 'Expected Uint8Array result');
assertDev(result instanceof Uint8Array, 'Expected Uint8Array result');
const fullResult: BytesWithDetailsType = {
data: result,
contentType: getContentType(response),