aboutsummaryrefslogtreecommitdiff
path: root/src/talerTypes.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-01-04 11:08:39 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-01-04 11:08:39 +0100
commit02b4a2ad6208c3b70a4a194b4c763a4e4334cdc1 (patch)
treed139d88ce51c328cb55a9e8ad8f9371c3351568e /src/talerTypes.ts
parentfd2cd9c383b07cd681c18137396deae025d98047 (diff)
downloadwallet-core-02b4a2ad6208c3b70a4a194b4c763a4e4334cdc1.tar.xz
store sender wire info in separate store
Diffstat (limited to 'src/talerTypes.ts')
-rw-r--r--src/talerTypes.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/talerTypes.ts b/src/talerTypes.ts
index 2ac2a5155..e83a0b6b6 100644
--- a/src/talerTypes.ts
+++ b/src/talerTypes.ts
@@ -630,3 +630,16 @@ export class TipToken {
*/
static checked: (obj: any) => TipToken;
}
+
+/**
+ * Wire detail, arbitrary object that must at least
+ * contain a "type" key.
+ */
+export type WireDetail = object & { type: string };
+
+/**
+ * Type guard for wire details.
+ */
+export function isWireDetail(x: any): x is WireDetail {
+ return x && typeof x === "object" && typeof x.type === "string";
+}