summaryrefslogtreecommitdiff
path: root/docs/guide
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-11-22 20:10:22 +0000
committerAylur <[email protected]>2024-11-22 20:10:34 +0000
commit4b87bb6c86b345aea63793a2f88ebdaec88c0d52 (patch)
treed20d4b36d93d982b23094885932b54943c65bdf3 /docs/guide
parentd3d95aaa52ea2433bb1a4945029238b93177f31d (diff)
docs: highlight global module tip
Diffstat (limited to 'docs/guide')
-rw-r--r--docs/guide/typescript/faq.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/guide/typescript/faq.md b/docs/guide/typescript/faq.md
index 444a0af..4ee616b 100644
--- a/docs/guide/typescript/faq.md
+++ b/docs/guide/typescript/faq.md
@@ -92,7 +92,7 @@ printerr("print this line to stderr")
## Populate the global scope with frequently accessed variables
-It might be annoying to always import Gtk only for `Gtk.Align` enums.
+It might be annoying to always import Gtk only for the `Gtk.Align` enum.
:::code-group
@@ -118,7 +118,7 @@ Object.assign(globalThis, {
:::code-group
-```tsx [Bar.tsx]
+```tsx [Bar.tsx] {3}
export default function Bar() {
return <window>
<box halign={START} />
@@ -131,11 +131,13 @@ export default function Bar() {
:::code-group
```ts [app.ts]
-import "./globals"
+import "./globals" // don't forget to import it first // [!code ++]
import Bar from "./Bar"
App.start({
- main: Bar
+ main() {
+ Bar()
+ }
})
```