cosmwasm: Move Expiration type into types file

This commit is contained in:
willclarktech
2020-11-27 13:20:59 +00:00
parent c274594935
commit c9d5cc50d4
6 changed files with 26 additions and 17 deletions
+1 -8
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",
+1 -1
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";
+12
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>;
};
+1 -7
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",
+1 -1
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";
+10
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>;
};