mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
fix(types): add sets to SyncPatch
This commit is contained in:
parent
e545264782
commit
7e4d3cbf42
1 changed files with 7 additions and 5 deletions
12
src/index.d.ts
vendored
12
src/index.d.ts
vendored
|
|
@ -254,11 +254,13 @@ declare namespace Charm {
|
||||||
| MaybeNone<State>
|
| MaybeNone<State>
|
||||||
| (State extends ReadonlyMap<infer K, infer V> | Map<infer K, infer V>
|
| (State extends ReadonlyMap<infer K, infer V> | Map<infer K, infer V>
|
||||||
? ReadonlyMap<K, SyncPatch<V> | None>
|
? ReadonlyMap<K, SyncPatch<V> | None>
|
||||||
: State extends readonly (infer T)[]
|
: State extends Set<infer T> | ReadonlySet<infer T>
|
||||||
? readonly (SyncPatch<T> | None | undefined)[]
|
? ReadonlySet<T | None>
|
||||||
: State extends object
|
: State extends readonly (infer T)[]
|
||||||
? { readonly [P in keyof State]?: SyncPatch<State[P]> }
|
? readonly (SyncPatch<T> | None | undefined)[]
|
||||||
: State);
|
: State extends object
|
||||||
|
? { readonly [P in keyof State]?: SyncPatch<State[P]> }
|
||||||
|
: State);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A payload that can be sent from the server to the client to synchronize
|
* A payload that can be sent from the server to the client to synchronize
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue