projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
87edea7
)
add typescript tuple generics
author
Arik Sosman
<git@arik.io>
Thu, 14 Jan 2021 11:17:14 +0000
(
03:17
-0800)
committer
Arik 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]
patch
|
blob
diff --git a/lab/bindings/typescript/util.ts
b/lab/bindings/typescript/util.ts
new file mode 100644
(file)
index 0000000..
4f3d113
--- /dev/null
+++ b/
lab/bindings/typescript/util.ts
@@ -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;
+ }
+}