Formatting for metadata documentation (#3969)

* Formatting for metadata documentation

* unwrap
This commit is contained in:
Jaco
2021-09-19 08:18:13 +02:00
committed by GitHub
parent f6e50f14b5
commit 598e69002a
9 changed files with 38 additions and 36 deletions
@@ -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 -1
View File
@@ -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 */
+2 -1
View File
@@ -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