diff --git a/package.json b/package.json index c6afc9edaa..bc236f318d 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "@babel/core": "^7.5.5", "@babel/register": "^7.5.5", "@babel/runtime": "^7.5.5", - "@polkadot/dev": "^0.31.0-beta.2", + "@polkadot/dev": "^0.31.0-beta.3", "@polkadot/ts": "^0.1.64", - "gh-pages": "2.0.1" + "gh-pages": "^2.1.1" } } diff --git a/packages/api-derive/src/type/HeaderExtended.ts b/packages/api-derive/src/type/HeaderExtended.ts index 34cf9a4f12..0d33914e45 100644 --- a/packages/api-derive/src/type/HeaderExtended.ts +++ b/packages/api-derive/src/type/HeaderExtended.ts @@ -8,7 +8,7 @@ import { AnyJsonObject, Constructor } from '@polkadot/types/types'; import runtimeTypes from '@polkadot/types/interfaces/runtime/definitions'; import { Struct } from '@polkadot/types'; -// @ts-ignore +// @ts-ignore We can ignore the properties, added via Struct.with const _Header: Constructor
= Struct.with(runtimeTypes.types.Header); /** diff --git a/packages/api-derive/src/type/ReferendumInfoExtended.ts b/packages/api-derive/src/type/ReferendumInfoExtended.ts index 9442f76fa5..2815ddc2a4 100644 --- a/packages/api-derive/src/type/ReferendumInfoExtended.ts +++ b/packages/api-derive/src/type/ReferendumInfoExtended.ts @@ -9,7 +9,7 @@ import BN from 'bn.js'; import democracyTypes from '@polkadot/types/interfaces/democracy/definitions'; import { Struct, createType } from '@polkadot/types'; -// @ts-ignore +// @ts-ignore We can ignore the properties, added via Struct.with const _ReferendumInfo: Constructor = Struct.with(democracyTypes.types.ReferendumInfo); /** diff --git a/packages/api/src/SignerPayload.ts b/packages/api/src/SignerPayload.ts index f97dfaa2a1..c66392bda6 100644 --- a/packages/api/src/SignerPayload.ts +++ b/packages/api/src/SignerPayload.ts @@ -3,6 +3,7 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { Address, Balance, BlockNumber, Call, ExtrinsicEra, Hash, Index } from '@polkadot/types/interfaces'; +import { Constructor } from '@polkadot/types/types'; import { SignerPayload, SignerPayloadRaw } from './types'; import { createType, Compact, Struct, u8 } from '@polkadot/types'; @@ -19,7 +20,9 @@ export interface SignerPayloadType { version: u8; } -export default class Payload extends Struct.with({ +// We explicitly cast the type here to get the actual TypeScript exports right +// @ts-ignore We can ignore the properties, added via Struct.with +const _Payload: Constructor = Struct.with({ address: 'Address', blockHash: 'Hash', blockNumber: 'BlockNumber', @@ -29,7 +32,9 @@ export default class Payload extends Struct.with({ nonce: 'Compact', tip: 'Compact', version: u8 -}) { +}); + +export default class Payload extends _Payload { /** * @description Returns this as a SignerPayloadType. This works since the Struct.with injects all the getters automatically (just ensure the 2 definitiona are matching) */ diff --git a/yarn.lock b/yarn.lock index 533472df36..d9b76291f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1795,10 +1795,10 @@ universal-user-agent "^3.0.0" url-template "^2.0.8" -"@polkadot/dev@^0.31.0-beta.2": - version "0.31.0-beta.2" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.31.0-beta.2.tgz#28d1e10cc40267db2dc7854916feeb0613c22609" - integrity sha512-jtexumNVyfcbIPCbuwYF77DE54it/CeKdg9HClyjig3Iw26Np0uHIrfDCxmINLwrckkuvka66hs64sj7u3QqXw== +"@polkadot/dev@^0.31.0-beta.3": + version "0.31.0-beta.3" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.31.0-beta.3.tgz#f9880e7c430e6a4df423211244a1dddb509c3eca" + integrity sha512-6VTgIR4EBvowVmaJorDmHbCctlUa+gTTL5etlU+T+yaVEA1vAS3gaSwlhgQY1baEjc9PNKHkfHun6MO/gqq+RA== dependencies: "@babel/cli" "^7.5.5" "@babel/core" "^7.5.5" @@ -6123,10 +6123,10 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -gh-pages@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-2.0.1.tgz#aefe47a43b8d9d2aa3130576b33fe95641e29a2f" - integrity sha512-uFlk3bukljeiWKQ2XvPfjcSi/ou7IfoDf2p+Fj672saLAr8bnOdFVqI/JSgrSgInKpCg5BksxEwGUl++dbg8Dg== +gh-pages@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-2.1.1.tgz#5be70a92f9cb70404bafabd8bb149c0e9a8c264b" + integrity sha512-yNW2SFp9xGRP/8Sk2WXuLI/Gn92oOL4HBgudn6PsqAnuWT90Y1tozJoTfX1WdrDSW5Rb90kLVOf5mm9KJ/2fDw== dependencies: async "^2.6.1" commander "^2.18.0"