Skip to content

Commit 38580c2

Browse files
committed
fix: py interop sample no longer requires decorators
Signed-off-by: Sam Gammon <[email protected]>
1 parent 47802dd commit 38580c2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Writerside/topics/Index.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,14 @@ Kotlin, Scala), and LLVM (Swift, C++, Rust) are on the way.
2323

2424
<code-block lang="typescript">
2525
// hello.ts
26-
import { sayHello } from "./my-app.py"
26+
import py from "./my-app.py"
2727

2828
// this line exists to show that this is typescript
29-
const msg: () => string = () => `${sayHello()} + TypeScript!`
29+
const msg: () => string = () => `${py.say_hello()} + TypeScript!`
3030
console.log(JSON.stringify({greeting: msg()}))
3131
</code-block>
3232

3333
<code-block lang="python">
34-
# my-app.py
35-
from elide import polyglot
36-
37-
@polyglot
3834
def say_hello():
3935
"""Render a greeting."""
4036
return f"Hello from Python"
@@ -48,6 +44,8 @@ elide ./hello.ts
4844
{"greeting": "Hello from Python + TypeScript!"}
4945
</code-block>
5046

47+
----
48+
5149
<br />
5250

5351
**%product% is extremely fast.**

0 commit comments

Comments
 (0)