Skip to content

Commit 56045e7

Browse files
authored
add explicit type annotations to exports for isolatedDeclarations (#1808)
1 parent 8f2ab52 commit 56045e7

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/amino/src/wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { sleep } from "@cosmjs/utils";
1313
* This reduces the scope of a potential rainbow attack to all CosmJS users.
1414
* Must be 16 bytes due to implementation limitations.
1515
*/
16-
export const cosmjsSalt = toAscii("The CosmJS salt.");
16+
export const cosmjsSalt: Uint8Array = toAscii("The CosmJS salt.");
1717

1818
export interface KdfConfiguration {
1919
/**

packages/faucet/src/constants.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import { parseBankTokens } from "./tokens";
55

66
export const binaryName = "cosmos-faucet";
77
export const memo: string | undefined = process.env.FAUCET_MEMO;
8-
export const gasPrice = GasPrice.fromString(process.env.FAUCET_GAS_PRICE || "0.025ucosm");
9-
export const gasLimitSend = process.env.FAUCET_GAS_LIMIT
8+
export const gasPrice: GasPrice = GasPrice.fromString(process.env.FAUCET_GAS_PRICE || "0.025ucosm");
9+
export const gasLimitSend: number = process.env.FAUCET_GAS_LIMIT
1010
? parseInt(process.env.FAUCET_GAS_LIMIT, 10)
1111
: 100_000;
1212
export const concurrency: number = Number.parseInt(process.env.FAUCET_CONCURRENCY || "", 10) || 5;
1313
export const port: number = Number.parseInt(process.env.FAUCET_PORT || "", 10) || 8000;
1414
export const mnemonic: string | undefined = process.env.FAUCET_MNEMONIC;
15-
export const addressPrefix = process.env.FAUCET_ADDRESS_PREFIX || "cosmos";
16-
export const pathPattern = process.env.FAUCET_PATH_PATTERN || "m/44'/118'/0'/0/a";
15+
export const addressPrefix: string = process.env.FAUCET_ADDRESS_PREFIX || "cosmos";
16+
export const pathPattern: string = process.env.FAUCET_PATH_PATTERN || "m/44'/118'/0'/0/a";
1717
export const tokenConfig: TokenConfiguration = {
1818
bankTokens: parseBankTokens(process.env.FAUCET_TOKENS || "ucosm, ustake"),
1919
};
@@ -23,6 +23,6 @@ export const tokenConfig: TokenConfiguration = {
2323
* Defaults to 24 hours if FAUCET_COOLDOWN_TIME unset or an empty string.
2424
* FAUCET_COOLDOWN_TIME can be set to "0" to deactivate.
2525
*/
26-
export const cooldownTime = process.env.FAUCET_COOLDOWN_TIME
26+
export const cooldownTime: number = process.env.FAUCET_COOLDOWN_TIME
2727
? Number.parseInt(process.env.FAUCET_COOLDOWN_TIME, 10)
2828
: 24 * 3600;

packages/proto-signing/src/signing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function makeAuthInfoBytes(
3535
gasLimit: number,
3636
feeGranter: string | undefined,
3737
feePayer: string | undefined,
38-
signMode = SignMode.SIGN_MODE_DIRECT,
38+
signMode: SignMode = SignMode.SIGN_MODE_DIRECT,
3939
): Uint8Array {
4040
// Required arguments 4 and 5 were added in CosmJS 0.29. Use runtime checks to help our non-TS users.
4141
assert(

packages/proto-signing/src/wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { sleep } from "@cosmjs/utils";
1313
* This reduces the scope of a potential rainbow attack to all CosmJS users.
1414
* Must be 16 bytes due to implementation limitations.
1515
*/
16-
export const cosmjsSalt = toAscii("The CosmJS salt.");
16+
export const cosmjsSalt: Uint8Array = toAscii("The CosmJS salt.");
1717

1818
export interface KdfConfiguration {
1919
/**

0 commit comments

Comments
 (0)