diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-08 23:07:41 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-08 23:07:41 +0530 |
| commit | 580ef150778326262d04018460f672bda53d5696 (patch) | |
| tree | 53b93a2e381e6c15ed4e959f766fc88afc234a0f /examples/ffi.ts | |
| parent | a41d70afe7692e4ef344bc3c599115009f2dad15 (diff) | |
| download | ts-types-lang-580ef150778326262d04018460f672bda53d5696.tar.gz ts-types-lang-580ef150778326262d04018460f672bda53d5696.zip | |
chore: adds prettier
Diffstat (limited to 'examples/ffi.ts')
| -rw-r--r-- | examples/ffi.ts | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/examples/ffi.ts b/examples/ffi.ts index 484e84d..0840ff6 100644 --- a/examples/ffi.ts +++ b/examples/ffi.ts @@ -1,19 +1,22 @@ -import { Bind, Debug, DefineEffect, Effect, JsExpr, Kind1 } from "../stdlib" +import { Bind, Debug, DefineEffect, Effect, JsExpr, Kind1 } from '../stdlib' -interface PrintK<Label extends string = ""> extends Kind1 { +interface PrintK<Label extends string = ''> extends Kind1 { return: Debug<Label, this['input']> } type Square<N extends number> = JsExpr<`${N} ** 2`> -interface Mathemagic<_A, _B extends number> extends Effect { } +interface Mathemagic<_A, _B extends number> extends Effect {} export type main = [ - Bind<JsExpr<"{ boobaa: [5 * 3, 5 * 2] }">, PrintK<'|'>>, - Bind<Square<69>, PrintK<"69^2 =">>, - DefineEffect<"Mathemagic", `(a, b) => { - console.log(typeToString(a)) - return { result: 5 * b.getLiteralValue() } - }`>, - Bind<Mathemagic<"a", 69>, PrintK<'69 * 5 ='>>, + Bind<JsExpr<'{ boobaa: [5 * 3, 5 * 2] }'>, PrintK<'|'>>, + Bind<Square<69>, PrintK<'69^2 ='>>, + DefineEffect< + 'Mathemagic', + `(a, b) => { + console.log(typeToString(a)) + return { result: 5 * b.getLiteralValue() } + }` + >, + Bind<Mathemagic<'a', 69>, PrintK<'69 * 5 ='>> ] |
