fix: Move variable definition to the end
This commit is contained in:
@@ -17,9 +17,9 @@ pub struct A {
|
||||
fn flatten() {
|
||||
insta::assert_snapshot!(<A as Typed>::generate_full().unwrap(), @r"
|
||||
---@class A
|
||||
local A
|
||||
---@field hello string
|
||||
---@field world boolean
|
||||
---@field cool integer
|
||||
local A
|
||||
");
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ pub enum ActionType {
|
||||
fn action_type() {
|
||||
insta::assert_snapshot!(<ActionType as Typed>::generate_full().unwrap(), @r#"
|
||||
---@class ActionType
|
||||
local ActionType
|
||||
---@field action
|
||||
---| "broadcast"
|
||||
---@field extras table<string, string>?
|
||||
local ActionType
|
||||
"#);
|
||||
}
|
||||
|
||||
@@ -56,12 +56,12 @@ pub struct Action {
|
||||
fn action() {
|
||||
insta::assert_snapshot!(<Action as Typed>::generate_full().unwrap(), @r#"
|
||||
---@class Action
|
||||
local Action
|
||||
---@field action
|
||||
---| "broadcast"
|
||||
---@field extras table<string, string>?
|
||||
---@field label string
|
||||
---@field clear boolean?
|
||||
local Action
|
||||
"#);
|
||||
}
|
||||
|
||||
@@ -80,11 +80,11 @@ pub struct Notification {
|
||||
fn notification() {
|
||||
insta::assert_snapshot!(<Notification as Typed>::generate_full().unwrap(), @r"
|
||||
---@class Notification
|
||||
local Notification
|
||||
---@field title string
|
||||
---@field message string?
|
||||
---@field tags string[]?
|
||||
---@field priority Priority?
|
||||
---@field actions Action[]?
|
||||
local Notification
|
||||
");
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ fn rename() {
|
||||
fn rename_nested() {
|
||||
insta::assert_snapshot!(<Other as Typed>::generate_full().unwrap(), @r"
|
||||
---@class Other
|
||||
local Other
|
||||
---@field rust Lua
|
||||
local Other
|
||||
");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user