From 8306ec0789854f9e04bc1708c4a7dc2afc1b4c90 Mon Sep 17 00:00:00 2001 From: Kevin <119447307+tokyob0t@users.noreply.github.com> Date: Fri, 25 Oct 2024 13:50:00 -0300 Subject: docs: lua docs (#50) --- docs/guide/typescript/binding.md | 6 +++--- docs/guide/typescript/utilities.md | 4 ++-- docs/guide/typescript/variable.md | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/guide/typescript') diff --git a/docs/guide/typescript/binding.md b/docs/guide/typescript/binding.md index 05645ab..15fe3cc 100644 --- a/docs/guide/typescript/binding.md +++ b/docs/guide/typescript/binding.md @@ -25,11 +25,11 @@ or an object implementing the `Connectable` interface and one of its properties (usually a `GObject.Object` instance). ```ts -function bind(obj: Subscribable): Binding +function bind(obj: Subscribable): Binding function bind< - Obj extends Connectable, - Prop extends keyof Obj, + Obj extends Connectable, + Prop extends keyof Obj, >(obj: Obj, prop: Prop): Binding ``` diff --git a/docs/guide/typescript/utilities.md b/docs/guide/typescript/utilities.md index 02dfdaf..361c33b 100644 --- a/docs/guide/typescript/utilities.md +++ b/docs/guide/typescript/utilities.md @@ -128,8 +128,8 @@ const proc = subprocess( // or with signals const proc = subprocess("some-command") -proc.connect("stdout", (out) => console.log(out)) -proc.connect("stderr", (err) => console.error(err)) +proc.connect("stdout", (_, out) => console.log(out)) +proc.connect("stderr", (_, err) => console.error(err)) ``` ### Executing external commands and scripts diff --git a/docs/guide/typescript/variable.md b/docs/guide/typescript/variable.md index 2abacbd..e6f3434 100644 --- a/docs/guide/typescript/variable.md +++ b/docs/guide/typescript/variable.md @@ -35,7 +35,7 @@ Widget.Label({ ``` :::warning -Make sure to make the transform functions passed to `.as()` are pure. +Make sure to the transform functions you pass to `:as()` are pure. The `.get()` function can be called anytime by `astal` especially when `deriving`, so make sure there are no sideeffects. ::: @@ -126,7 +126,7 @@ const myvar = Variable("") ## Dispose if no longer needed -This will stop the interval and force exit the subprocess and disconnect gobjects. +This will stop the interval, force exit the subprocess and disconnect gobjects. ```js myVar.drop() -- cgit v1.2.3 From ab64f9eadf5c64d5353f7dce681d3ed3abd7df4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=28=E2=97=95=E1=B4=A5=E2=97=95=29?= Date: Sun, 27 Oct 2024 00:10:56 +0800 Subject: docs: fix gtk3 widget broken links (#60) --- docs/guide/typescript/widget.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/guide/typescript') diff --git a/docs/guide/typescript/widget.md b/docs/guide/typescript/widget.md index 3bdf394..7ed69e3 100644 --- a/docs/guide/typescript/widget.md +++ b/docs/guide/typescript/widget.md @@ -197,18 +197,18 @@ These widgets are available by default in JSX. - button: [Astal.Button](https://aylur.github.io/libastal/astal3/class.Button.html) - centerbox: [Astal.CenterBox](https://aylur.github.io/libastal/astal3/class.CenterBox.html) - circularprogress: [Astal.CircularProgress](https://aylur.github.io/libastal/astal3/class.CircularProgress.html) -- drawingarea: [Gtk.DrawingArea](https://docs.gtk.org/gtk3/astal3/class.DrawingArea.html) -- entry: [Gtk.Entry](https://docs.gtk.org/gtk3/astal3/class.Entry.html) +- drawingarea: [Gtk.DrawingArea](https://docs.gtk.org/gtk3/class.DrawingArea.html) +- entry: [Gtk.Entry](https://docs.gtk.org/gtk3/class.Entry.html) - eventbox: [Astal.EventBox](https://aylur.github.io/libastal/astal3/class.EventBox.html) - icon: [Astal.Icon](https://aylur.github.io/libastal/astal3/class.Icon.html) - label: [Astal.Label](https://aylur.github.io/libastal/astal3/class.Label.html) - levelbar: [Astal.LevelBar](https://aylur.github.io/libastal/astal3/class.LevelBar.html) - overlay: [Astal.Overlay](https://aylur.github.io/libastal/astal3/class.Overlay.html) -- revealer: [Gtk.Revealer](https://docs.gtk.org/gtk3/astal3/class.Revealer.html) +- revealer: [Gtk.Revealer](https://docs.gtk.org/gtk3/class.Revealer.html) - scrollable: [Astal.Scrollable](https://aylur.github.io/libastal/astal3/class.Scrollable.html) - slider: [Astal.Slider](https://aylur.github.io/libastal/astal3/class.Slider.html) - stack: [Astal.Stack](https://aylur.github.io/libastal/astal3/class.Stack.html) -- switch: [Gtk.Switch](https://docs.gtk.org/gtk3/astal3/class.Switch.html) +- switch: [Gtk.Switch](https://docs.gtk.org/gtk3/class.Switch.html) - window: [Astal.Window](https://aylur.github.io/libastal/astal3/class.Window.html) ## Gtk4 -- cgit v1.2.3