Formatting for metadata documentation (#3969)
* Formatting for metadata documentation * unwrap
This commit is contained in:
@@ -10,8 +10,10 @@ import substrate from './substrate';
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
// Not 100% sure it is relevant, however the order here is the same
|
||||
// as exposed in the typegen lookup order
|
||||
...substrate,
|
||||
...polkadot,
|
||||
...kusama,
|
||||
...substrate
|
||||
...kusama
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-`, do not edit
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
@@ -42,7 +42,8 @@ export function unwrapStorageSi (type: StorageEntryTypeLatest): SiLookupTypeId {
|
||||
|
||||
/** @internal */
|
||||
export function unwrapStorageType (registry: Registry, type: StorageEntryTypeLatest, isOptional?: boolean): keyof InterfaceTypes {
|
||||
const outputType = registry.lookup.getTypeDef(unwrapStorageSi(type)).type;
|
||||
const typeDef = registry.lookup.getTypeDef(unwrapStorageSi(type));
|
||||
const outputType = typeDef.lookupName || typeDef.type;
|
||||
|
||||
return isOptional
|
||||
? `Option<${outputType}>` as keyof InterfaceTypes
|
||||
|
||||
Reference in New Issue
Block a user