Use assertUnreachable from @polkadot/util (#4600)
This commit is contained in:
@@ -9,9 +9,7 @@ import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDefArray, SiTypeDef
|
||||
|
||||
import { sanitize, Struct, u32 } from '@polkadot/types-codec';
|
||||
import { getTypeDef, TypeDefInfo, withTypeString } from '@polkadot/types-create';
|
||||
import { assert, isNumber, isString, logger, objectSpread, stringCamelCase, stringify, stringPascalCase } from '@polkadot/util';
|
||||
|
||||
import { assertUnreachable } from './util';
|
||||
import { assert, assertUnreachable, isNumber, isString, logger, objectSpread, stringCamelCase, stringify, stringPascalCase } from '@polkadot/util';
|
||||
|
||||
const l = logger('PortableRegistry');
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { PortableType, Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefComposite, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefVariant, Si1Field, Si1TypeDef, SiTypeDef } from '../../interfaces';
|
||||
import type { Registry } from '../../types';
|
||||
|
||||
import { assertUnreachable } from './util';
|
||||
import { assertUnreachable } from '@polkadot/util';
|
||||
|
||||
function convertType (key: 'Compact' | 'Sequence'): (registry: Registry, si: Si0TypeDefSequence) => SiTypeDef {
|
||||
return (registry: Registry, { type }: Si0TypeDefSequence) =>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function assertUnreachable (_x: never): never {
|
||||
throw new Error("Didn't expect to get here");
|
||||
}
|
||||
Reference in New Issue
Block a user