add typescript tuple generics
authorArik Sosman <git@arik.io>
Thu, 14 Jan 2021 11:17:14 +0000 (03:17 -0800)
committerArik Sosman <git@arik.io>
Thu, 14 Jan 2021 11:17:14 +0000 (03:17 -0800)
lab/bindings/typescript/util.ts [new file with mode: 0644]

diff --git a/lab/bindings/typescript/util.ts b/lab/bindings/typescript/util.ts
new file mode 100644 (file)
index 0000000..4f3d113
--- /dev/null
@@ -0,0 +1,21 @@
+export class TwoTuple<A, B> {
+    public a: A;
+    public b: B;
+
+    constructor(a: A, b: B) {
+        this.a = a;
+        this.b = b;
+    }
+}
+
+export class ThreeTuple<A, B, C> {
+    public a: A;
+    public b: B;
+    public c: C;
+
+    constructor(a: A, b: B, c: C) {
+        this.a = a;
+        this.b = b;
+        this.c = c;
+    }
+}