mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Add roc code to ts-interop example
This commit is contained in:
parent
7ce4d3b22f
commit
ca900550a2
3 changed files with 292 additions and 6 deletions
13
examples/typescript-interop/main.roc
Normal file
13
examples/typescript-interop/main.roc
Normal file
|
@ -0,0 +1,13 @@
|
|||
app "libhello"
|
||||
packages { pf: "platform/main.roc" }
|
||||
imports []
|
||||
provides [main] to pf
|
||||
|
||||
main : U64 -> Str
|
||||
main = \num ->
|
||||
if num == 0 then
|
||||
"I need a positive number here!"
|
||||
else
|
||||
str = Num.toStr num
|
||||
|
||||
"The number was \(str), OH YEAH!!! 🤘🤘"
|
Loading…
Add table
Add a link
Reference in a new issue