aboutsummaryrefslogtreecommitdiff
path: root/examples/ffi.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--examples/ffi.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/ffi.ts b/examples/ffi.ts
new file mode 100644
index 0000000..7a73a0a
--- /dev/null
+++ b/examples/ffi.ts
@@ -0,0 +1,12 @@
+import { Bind, Debug, JsExpr, Kind1 } from "../src/stdlib"
+
+interface PrintK<Label extends string = ""> extends Kind1 {
+ return: Debug<Label, this['input']>
+}
+
+type Square<N extends number> = JsExpr<`${N} ** 2`>
+
+export type main = [
+ Bind<JsExpr<"{ boobaa: [5 * 3, 5 * 2] }">, PrintK<'|'>>,
+ Bind<Square<69>, PrintK<"69^2 =">>,
+]