mirror of
https://github.com/centau/vide.git
synced 2026-08-20 06:21:37 +00:00
Fix type error when not specifying scope destroy delay
This commit is contained in:
parent
d7d2f5167e
commit
f370e3f841
4 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ type Source<T> = () -> T
|
|||
|
||||
local function indexes<K, V, Obj>(
|
||||
input: Source<Map<K, V>>,
|
||||
component: (Source<V>, K, Source<boolean>) -> (Obj, number?)
|
||||
component: (Source<V>, K, Source<boolean>) -> (Obj, ...number)
|
||||
): Source<Array<Obj>>
|
||||
local update_count = 0
|
||||
local scopes = {} :: Map<K, {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ type Source<T> = () -> T
|
|||
|
||||
local function show<T, Obj>(
|
||||
input: Source<T?>,
|
||||
component: (Source<T>, Source<boolean>) -> (Obj, number?),
|
||||
fallback: ((Source<boolean>) -> (Obj, number?))?
|
||||
component: (Source<T>, Source<boolean>) -> (Obj, ...number),
|
||||
fallback: ((Source<boolean>) -> (Obj, ...number))?
|
||||
): Source<nil | Obj | Array<Obj>>
|
||||
local filtered_input = source()
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ local timeout = require "./timeout" ()
|
|||
type Array<T> = { T }
|
||||
type Map<K, V> = { [K]: V }
|
||||
type Source<T> = () -> T
|
||||
type Component<T> = (Source<boolean>) -> (T, number?)
|
||||
type Component<T> = (Source<boolean>) -> (T, ...number)
|
||||
|
||||
local function switch_map<K, Obj>(
|
||||
input: Source<K>,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ type Source<T> = () -> T
|
|||
|
||||
local function values<K, V, Obj>(
|
||||
input: Source<Map<K, V>>,
|
||||
component: (V, Source<K>, Source<boolean>) -> (Obj, number?)
|
||||
component: (V, Source<K>, Source<boolean>) -> (Obj, ...number)
|
||||
): Source<Array<Obj>>
|
||||
local update_count = 0
|
||||
local scopes = {} :: Map<V, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue