From 42f64c01c49af5ef077672dd581f52867642f02a Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sun, 22 Jun 2025 16:24:52 +0800 Subject: [PATCH] fix: bind `self` in stub arguments Fixes https://github.com/yazi-rs/yazi-rs.github.io/issues/256 --- types.yazi/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types.yazi/main.lua b/types.yazi/main.lua index 45a1fa7..cb860d5 100644 --- a/types.yazi/main.lua +++ b/types.yazi/main.lua @@ -2738,7 +2738,7 @@ ya = ya -- | | | | -- | ------- | ----------------- | ------------------------------------------------ | -- | Inherit | [`Style`](#style) | To call [`Style`](#style) methods on it directly | ----@field Span fun(value: string|self): ui.Span +---@field Span fun(value: string|ui.Span): ui.Span -- `ui.Line` represents a line, consisting of multiple `ui.Span`s, and it accepts a table of them: -- ```lua -- ui.Line { ui.Span("foo"), ui.Span("bar") } @@ -2757,7 +2757,7 @@ ya = ya -- | | | | -- | ------- | ----------------- | ------------------------------------------------ | -- | Inherit | [`Style`](#style) | To call [`Style`](#style) methods on it directly | ----@field Line fun(value: string|ui.Span|self|(string|ui.Span|self)[]): ui.Line +---@field Line fun(value: string|ui.Span|ui.Line|(string|ui.Span|ui.Line)[]): ui.Line -- `ui.Text` is used to represent multi-line text, it takes a table of `ui.Line`: -- ```lua -- ui.Text { ui.Line("foo"), ui.Line("bar") }