mirror of
https://github.com/littensy/charm.git
synced 2026-10-22 04:14:08 +00:00
refactor: code quality
This commit is contained in:
parent
f0a7938703
commit
8ca299f671
16 changed files with 82 additions and 101 deletions
|
|
@ -1,10 +1,9 @@
|
|||
local capture = require(script.Parent.capture)
|
||||
local store = require(script.Parent.store)
|
||||
local types = require(script.Parent.types)
|
||||
type Molecule<T> = types.Molecule<T>
|
||||
|
||||
local function subscribe<T>(molecule: Molecule<T>, callback: (state: T, prev: T) -> ()): () -> ()
|
||||
local atoms, state = capture(molecule)
|
||||
local atoms, state = store.capture(molecule)
|
||||
|
||||
local function listener()
|
||||
local prevState = state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue