(hopefully) fix d.ts generation with explicit imports (#394)
This commit is contained in:
@@ -4,9 +4,12 @@
|
||||
|
||||
import BN from 'bn.js';
|
||||
import { AccountId, Balance, BlockNumber, PropIndex, Proposal, ReferendumIndex, VoteThreshold } from '@polkadot/types/index';
|
||||
import { Constructor } from '@polkadot/types/types';
|
||||
import { Struct, Tuple, Vector } from '@polkadot/types/codec';
|
||||
|
||||
export class RxProposal extends Struct.with({ id: PropIndex, proposal: Proposal, address: AccountId }) {
|
||||
const ProposalStruct: Constructor<Struct<any>> = Struct.with({ id: PropIndex, proposal: Proposal, address: AccountId });
|
||||
|
||||
export class RxProposal extends ProposalStruct {
|
||||
constructor (value: Tuple) {
|
||||
super({
|
||||
id: value.getAtIndex(0),
|
||||
@@ -28,7 +31,9 @@ export class RxProposal extends Struct.with({ id: PropIndex, proposal: Proposal,
|
||||
}
|
||||
}
|
||||
|
||||
export class RxProposalDeposits extends Struct.with({ balance: Balance, addresses: Vector.with(AccountId) }) {
|
||||
const DepositStruct: Constructor<Struct<any>> = Struct.with({ balance: Balance, addresses: Vector.with(AccountId) });
|
||||
|
||||
export class RxProposalDeposits extends DepositStruct {
|
||||
constructor (value: Tuple) {
|
||||
super({
|
||||
balance: value.getAtIndex(0),
|
||||
@@ -45,7 +50,9 @@ export class RxProposalDeposits extends Struct.with({ balance: Balance, addresse
|
||||
}
|
||||
}
|
||||
|
||||
export class RxReferendum extends Struct.with({ blockNumber: BlockNumber, proposal: Proposal, voteThreshold: VoteThreshold, id: ReferendumIndex }) {
|
||||
const ReferendumStruct: Constructor<Struct<any>> = Struct.with({ blockNumber: BlockNumber, proposal: Proposal, voteThreshold: VoteThreshold, id: ReferendumIndex });
|
||||
|
||||
export class RxReferendum extends ReferendumStruct {
|
||||
constructor (value: Tuple, id: ReferendumIndex | BN | number) {
|
||||
super({
|
||||
blockNumber: value.getAtIndex(0),
|
||||
|
||||
Reference in New Issue
Block a user