mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Revert "Echo initial value if given a source"
This reverts commit 16e2983c54758cabfb1ddd102090f20083820d03.
This commit is contained in:
parent
109cca45f3
commit
a543a24865
2 changed files with 1 additions and 11 deletions
|
|
@ -9,10 +9,6 @@ local update = graph.update
|
|||
export type Source<T> = (() -> T) & ((T) -> T)
|
||||
|
||||
local function source<T>(initial_value: T): Source<T>
|
||||
if type(initial_value) == "function" then
|
||||
return initial_value
|
||||
end
|
||||
|
||||
local node = create_start_node(initial_value)
|
||||
|
||||
return function(...): T
|
||||
|
|
@ -32,4 +28,4 @@ local function source<T>(initial_value: T): Source<T>
|
|||
end
|
||||
end
|
||||
|
||||
return source :: (<T>(source: Source<T>) -> Source<T>) & (<T>(initial_value: T) -> Source<T>) & (<T>() -> Source<T>)
|
||||
return source :: (<T>(initial_value: T) -> Source<T>) & (<T>() -> Source<T>)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue