mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
16 lines
345 B
Lua
16 lines
345 B
Lua
export type WeakMap<K, V> = typeof(setmetatable({} :: { [K]: V }, { __mode = "k" }))
|
|
|
|
export type Atom<T> = (() -> T) & (state: T | (T) -> T) -> T
|
|
|
|
export type Source<T> = () -> T
|
|
|
|
export type AtomOptions<T> = {
|
|
equals: (prev: T, next: T) -> boolean,
|
|
}
|
|
|
|
export type SyncPayload = {
|
|
type: "patch" | "init",
|
|
data: { [any]: any },
|
|
}
|
|
|
|
return nil
|