fix: Wrap inner type in brackets
This commit is contained in:
@@ -160,13 +160,13 @@ impl !Typed for () {}
|
||||
|
||||
impl<T: Typed> Typed for Option<T> {
|
||||
fn type_name() -> String {
|
||||
format!("{}?", <T as Typed>::type_name())
|
||||
format!("({})?", <T as Typed>::type_name())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Typed> Typed for Vec<T> {
|
||||
fn type_name() -> String {
|
||||
format!("{}[]", <T as Typed>::type_name())
|
||||
format!("({})[]", <T as Typed>::type_name())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ fn action() {
|
||||
---| "broadcast"
|
||||
---@field extras table<string, string>?
|
||||
---@field label string
|
||||
---@field clear boolean?
|
||||
---@field clear (boolean)?
|
||||
local Action
|
||||
"#);
|
||||
}
|
||||
@@ -81,10 +81,10 @@ fn notification() {
|
||||
insta::assert_snapshot!(<Notification as Typed>::generate_full().unwrap(), @r"
|
||||
---@class Notification
|
||||
---@field title string
|
||||
---@field message string?
|
||||
---@field tags string[]?
|
||||
---@field priority Priority?
|
||||
---@field actions Action[]?
|
||||
---@field message (string)?
|
||||
---@field tags (string)[]?
|
||||
---@field priority (Priority)?
|
||||
---@field actions (Action)[]?
|
||||
local Notification
|
||||
");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user