Ensure *.d.ts files are generated in outputs (#4362)

* Ensure *.d.ts files are generated in outputs

* Adjust

* Additional dep

* Update

* Update refs
This commit is contained in:
Jaco
2021-12-20 10:00:10 +02:00
committed by GitHub
parent aa704210f8
commit 67ee8b08d9
21 changed files with 80 additions and 64 deletions
+1
View File
@@ -27,6 +27,7 @@
"@polkadot/api-base": "6.12.2-24",
"@polkadot/api-derive": "6.12.2-24",
"@polkadot/keyring": "^8.2.2",
"@polkadot/rpc-augment": "6.12.2-24",
"@polkadot/rpc-core": "6.12.2-24",
"@polkadot/rpc-provider": "6.12.2-24",
"@polkadot/types": "6.12.2-24",
+3 -3
View File
@@ -4,7 +4,7 @@
import type { Observable, Subscription } from 'rxjs';
import type { Text } from '@polkadot/types';
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
import type { ChainProperties, Hash, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
import type { ChainProperties, Hash, HeaderPartial, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import type { BN } from '@polkadot/util';
import type { HexString } from '@polkadot/util/types';
@@ -151,7 +151,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
this._genesisHash.eq(blockHash)
? { number: BN_ZERO, parentHash: this._genesisHash }
: await firstValueFrom(this._rpcCore.chain.getHeader.raw(blockHash))
);
) as unknown as HeaderPartial;
assert(!header.parentHash.isEmpty, 'Unable to retrieve header and parent from supplied hash');
@@ -161,7 +161,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
(firstVersion && (lastVersion || firstVersion.specVersion.eq(this._runtimeVersion.specVersion)))
? { specName: this._runtimeVersion.specName, specVersion: firstVersion.specVersion }
: await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))
);
) as unknown as RuntimeVersionPartial;
const existingViaVersion = this._getBlockRegistryViaVersion(blockHash, version);
+2
View File
@@ -1,6 +1,8 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/rpc-augment';
export { Keyring } from '@polkadot/keyring';
export { WsProvider, HttpProvider } from '@polkadot/rpc-provider';
+3 -1
View File
@@ -7,11 +7,13 @@
},
"exclude": [
"**/checkTypes.manual.ts",
"**/*.spec.ts"
"**/*.spec.ts",
"**/test/**/*"
],
"references": [
{ "path": "../api-base" },
{ "path": "../api-derive" },
{ "path": "../rpc-augment" },
{ "path": "../rpc-core" },
{ "path": "../rpc-provider" },
{ "path": "../types" },