mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
This commit is contained in:
parent
f7ce5f024d
commit
7cdcebf03c
11 changed files with 367 additions and 233 deletions
26
todo.md
26
todo.md
|
|
@ -39,6 +39,32 @@ async/loading/suspense
|
|||
|
||||
define order with nested properties
|
||||
|
||||
```lua
|
||||
type Action<T> = {
|
||||
type: T,
|
||||
priority: number,
|
||||
callback: (Instance) -> ()
|
||||
}
|
||||
|
||||
local function action(priority: number, fn: (Instance) -> ()): Action
|
||||
|
||||
end
|
||||
|
||||
local function Changed(property: string, callback: () -> ())
|
||||
return action(1, function(instance)
|
||||
instance:GetPropertyChangedSignal(property):Connect(callback)
|
||||
end) :: Action<"Changed">
|
||||
end
|
||||
|
||||
create "TextBox" {
|
||||
Text = "test",
|
||||
|
||||
Changed "Text" < function(self, data)
|
||||
|
||||
end
|
||||
}
|
||||
```
|
||||
|
||||
## version 1
|
||||
|
||||
```lua
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue