Move PortableRegistry alongside metadata (#4172)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PortableRegistry, PortableType, SiLookupTypeId, SiPath, SiTypeParameter } from '@polkadot/types/interfaces';
|
||||
import type { PortableType, SiLookupTypeId, SiPath, SiTypeParameter } from '@polkadot/types/interfaces';
|
||||
import type { PortableRegistry } from '@polkadot/types/metadata';
|
||||
import type { TypeDef } from '@polkadot/types/types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PortableRegistry, StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { StorageEntryMetadataLatest } from '@polkadot/types/interfaces';
|
||||
import type { Metadata, PortableRegistry } from '@polkadot/types/metadata';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { ExtraTypes } from './types';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { MetadataLatest, PortableRegistry, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { MetadataLatest, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { PortableRegistry } from '@polkadot/types/metadata';
|
||||
import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
|
||||
|
||||
import fs from 'fs';
|
||||
|
||||
@@ -44,7 +44,7 @@ export function setImports (allDefs: Record<string, ModuleTypes>, imports: TypeI
|
||||
// do nothing
|
||||
} else if (['AnyNumber', 'CallFunction', 'Codec', 'IExtrinsic', 'ITuple'].includes(type)) {
|
||||
typesTypes[type] = true;
|
||||
} else if (type === 'Metadata') {
|
||||
} else if (['Metadata', 'PortableRegistry'].includes(type)) {
|
||||
metadataTypes[type] = true;
|
||||
} else if ((codecClasses as Record<string, unknown>)[type]) {
|
||||
codecTypes[type] = true;
|
||||
|
||||
Reference in New Issue
Block a user