cosmwasm: Move Expiration type into types file

This commit is contained in:
willclarktech 2020-11-27 12:19:10 +00:00
parent c274594935
commit c9d5cc50d4
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
6 changed files with 26 additions and 17 deletions

View File

@ -4,14 +4,7 @@ import { BroadcastMode, GasLimits, GasPrice, OfflineSigner } from "@cosmjs/launc
import { CosmosMsg } from "./cosmosmsg";
import { Account } from "./cosmwasmclient";
import { CosmWasmFeeTable, ExecuteResult, SigningCosmWasmClient } from "./signingcosmwasmclient";
export type Expiration =
| {
readonly at_height: number;
}
| {
readonly at_time: number;
};
import { Expiration } from "./types";
export enum Vote {
Yes = "yes",

View File

@ -20,7 +20,6 @@ export {
export { Cw1CosmWasmClient } from "./cw1cosmwasmclient";
export {
Cw3CosmWasmClient,
Expiration,
ProposalResult,
ProposalsResult,
ThresholdResult,
@ -54,3 +53,4 @@ export {
MsgUpdateAdmin,
MsgStoreCode,
} from "./msgs";
export { Expiration } from "./types";

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { fromBase64, fromHex } from "@cosmjs/encoding";
export interface WasmData {
@ -25,3 +26,14 @@ export function parseWasmData({ key, val }: WasmData): Model {
* This doen't privide any type safety over `any` but expresses intent in the code.
*/
export type JsonObject = any;
export type Expiration =
| {
readonly at_height: number;
}
| {
readonly at_time: number;
}
| {
readonly never: Record<any, never>;
};

View File

@ -2,13 +2,7 @@ import { BroadcastMode, GasLimits, GasPrice, OfflineSigner } from "@cosmjs/launc
import { CosmosMsg } from "./cosmosmsg";
import { Account } from "./cosmwasmclient";
import { CosmWasmFeeTable, ExecuteResult, SigningCosmWasmClient } from "./signingcosmwasmclient";
export declare type Expiration =
| {
readonly at_height: number;
}
| {
readonly at_time: number;
};
import { Expiration } from "./types";
export declare enum Vote {
Yes = "yes",
No = "no",

View File

@ -20,7 +20,6 @@ export {
export { Cw1CosmWasmClient } from "./cw1cosmwasmclient";
export {
Cw3CosmWasmClient,
Expiration,
ProposalResult,
ProposalsResult,
ThresholdResult,
@ -54,3 +53,4 @@ export {
MsgUpdateAdmin,
MsgStoreCode,
} from "./msgs";
export { Expiration } from "./types";

View File

@ -12,3 +12,13 @@ export declare function parseWasmData({ key, val }: WasmData): Model;
* This doen't privide any type safety over `any` but expresses intent in the code.
*/
export declare type JsonObject = any;
export declare type Expiration =
| {
readonly at_height: number;
}
| {
readonly at_time: number;
}
| {
readonly never: Record<any, never>;
};