aboutsummaryrefslogtreecommitdiff
path: root/src/talerTypes.ts
diff options
context:
space:
mode:
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";
+}