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

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { getOwn } from './getOwn';
import { assert } from './assert';
import { assertDev } from './assert';
export const deconstructLookup = <T>(
lookup: Record<string, T>,
@@ -14,7 +14,7 @@ export const deconstructLookup = <T>(
if (value) {
result.push(value);
} else {
assert(false, `deconstructLookup: lookup failed for ${key}; dropping`);
assertDev(false, `deconstructLookup: lookup failed for ${key}; dropping`);
}
});
return result;