aboutsummaryrefslogtreecommitdiff
path: root/examples/ffi.ts
blob: 7a73a0aeeb5e2a23068d2fb9862aaa5a2824f7e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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 =">>,
]