Adjust type generation to correctly cater for ambient definitions (#5034)

This commit is contained in:
Jaco
2022-07-05 15:44:59 +03:00
committed by GitHub
parent 23660cf7f7
commit c69ed65bb6
41 changed files with 129 additions and 39 deletions
View File
+7
View File
@@ -1,5 +1,12 @@
# CHANGELOG
## master
Changes:
- Adjust type generation to correctly cater for ambient definitions
## 8.11.3 Jul 5, 2022
Changes:
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/consts';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/errors';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/errors';
import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/events';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/events';
import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/storage';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/calls';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/submittable';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/submittable';
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/consts';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/errors';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/errors';
import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/events';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/events';
import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/storage';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/calls';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/submittable';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/submittable';
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/consts';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/errors';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/errors';
import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/events';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/events';
import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/storage';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/calls';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/api-base/types/submittable';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/submittable';
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
+5 -1
View File
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
// import '@polkadot/rpc-core/types/jsonrpc';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/rpc-core/types/jsonrpc';
import type { AugmentedRpc } from '@polkadot/rpc-core/types';
import type { Metadata, StorageKey } from '@polkadot/types';
@@ -28,6 +30,8 @@ import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockRespon
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';
import type { IExtrinsic, Observable } from '@polkadot/types/types';
export type __AugmentedRpc = AugmentedRpc<() => unknown>;
declare module '@polkadot/rpc-core/types/jsonrpc' {
interface RpcInterface {
author: {
+3 -1
View File
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/api-base/types/calls';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/calls';
{{{ importsAll }}}
+3 -1
View File
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/api-base/types/consts';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/consts';
{{{ importsAll }}}
+3 -1
View File
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/api-base/types/errors';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/errors';
{{{ importsAll }}}
+3 -1
View File
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/api-base/types/events';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/events';
{{{ importsAll }}}
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/types/types/registry';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types/types/registry';
{{{ importsAll }}}
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/types/lookup';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types/lookup';
{{{ importsAll }}}
+3 -1
View File
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/api-base/types/storage';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/storage';
{{{ importsAll }}}
+5 -1
View File
@@ -1,9 +1,13 @@
{{> header }}
// import '@polkadot/rpc-core/types/jsonrpc';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/rpc-core/types/jsonrpc';
{{{ importsAll }}}
export type __AugmentedRpc = AugmentedRpc<() => unknown>;
declare module '@polkadot/rpc-core/types/jsonrpc' {
interface RpcInterface {
{{#each modules}}
+3 -1
View File
@@ -1,6 +1,8 @@
{{> header }}
// import '@polkadot/api-base/types/submittable';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/submittable';
{{{ importsAll }}}
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
// import '@polkadot/types/lookup';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types/lookup';
import type { Compact, Enum, Null, Struct, Vec, u16, u32 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
// import '@polkadot/types/lookup';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types/lookup';
import type { BitVec, Bytes, Compact, Enum, Null, Option, Result, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
// import '@polkadot/types/lookup';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types/lookup';
import type { Data } from '@polkadot/types';
import type { BTreeMap, Bytes, Compact, Enum, Null, Option, Result, Set, Struct, Text, U256, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
// import '@polkadot/types/types/registry';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types/types/registry';
import type { Data, StorageKey } from '@polkadot/types';
import type { BitVec, Bool, Bytes, F32, F64, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, f32, f64, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
@@ -1,7 +1,9 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
// import '@polkadot/types/types/registry';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types/types/registry';
import type { KusamaRuntimeNposCompactSolution24, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeRuntime, KusamaRuntimeSessionKeys } from '@polkadot/types/lookup';
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,8 @@
// Copyright 2017-2022 @polkadot/types-create authors & contributors
// SPDX-License-Identifier: Apache-2.0
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types-codec/types/registry';
import type { Codec, CodecClass, ICompact, INumber } from '@polkadot/types-codec/types';
@@ -1,6 +1,8 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types-create/types/lookup';
import type { Vec } from '@polkadot/types-codec';
+3 -1
View File
@@ -1,8 +1,10 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-create/types/augmentRegistry';
// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@polkadot/types-codec/types/registry';
import '@polkadot/types-create/types/augmentRegistry';
import type { Codec, CodecClass } from '@polkadot/types-codec/types';
import type { TypeDef } from '@polkadot/types-create/types';
+6 -3
View File
@@ -1,13 +1,17 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// augment our internal Lookup & Registry interfaces
import './augmentLookup';
import './augmentRegistry';
// used inside augmented definitions
export type { Observable } from 'rxjs';
// augmented exports
export * from '@polkadot/types/types/registry';
// used inside augmented definitions
export type { Observable } from 'rxjs';
// other exports
export * from '../create/types';
export * from './calls';
export * from './codec';
@@ -16,4 +20,3 @@ export * from './detect';
export * from './events';
export * from './extrinsic';
export * from './interfaces';
export * from './registry';