Expand enum & struct defnitions, generator strict mode (#1798)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
|
||||
// Copyright 2017-2020 @polkadot/metadata authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { Codec } from '@polkadot/types/types';
|
||||
import { ModuleConstantMetadataLatest } from '@polkadot/types/interfaces';
|
||||
|
||||
export type AugmentedConst<T extends Codec> = T & ConstantCodec;
|
||||
|
||||
export type ModuleConstants = Record<string, Codec>;
|
||||
|
||||
export interface Constants {
|
||||
[index: string]: ModuleConstants;
|
||||
}
|
||||
|
||||
export interface ConstantCodec extends Codec {
|
||||
meta: ModuleConstantMetadataLatest;
|
||||
}
|
||||
@@ -3,20 +3,8 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { StorageEntry } from '@polkadot/types/primitive/StorageKey';
|
||||
import { Codec } from '@polkadot/types/types';
|
||||
import { ModuleConstantMetadataLatest } from '@polkadot/types/interfaces';
|
||||
|
||||
export type AugmentedConst<T extends Codec> = T & ConstantCodec;
|
||||
|
||||
export interface ConstantCodec extends Codec {
|
||||
meta: ModuleConstantMetadataLatest;
|
||||
}
|
||||
|
||||
export type ModuleConstants = Record<string, Codec>;
|
||||
|
||||
export interface Constants {
|
||||
[index: string]: ModuleConstants;
|
||||
}
|
||||
export * from './consts/types';
|
||||
|
||||
export interface ModuleStorage {
|
||||
[key: string]: StorageEntry;
|
||||
|
||||
Reference in New Issue
Block a user