@pluv/client 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts CHANGED
@@ -22,7 +22,10 @@ export type EventResolver<
22
22
  TOutput extends EventRecord<string, any> = {},
23
23
  TPresence extends JsonObject = {},
24
24
  TStorage extends Record<string, CrdtType<any, any>> = {},
25
- > = (data: TInput, context: EventResolverContext<TIO, TPresence, TStorage>) => MaybePromise<TOutput | void>;
25
+ > = (
26
+ data: TInput,
27
+ context: EventResolverContext<TIO, TPresence, TStorage>,
28
+ ) => MaybePromise<TOutput | void>;
26
29
 
27
30
  export interface EventResolverContext<
28
31
  TIO extends IOLike = IOLike,
@@ -67,7 +70,9 @@ export interface PluvClientLimits {
67
70
  export interface PublicKeyParams<TMetadata extends JsonObject> {
68
71
  metadata: TMetadata;
69
72
  }
70
- export type PublicKey<TMetadata extends JsonObject> = string | ((params: PublicKeyParams<TMetadata>) => string);
73
+ export type PublicKey<TMetadata extends JsonObject> =
74
+ | string
75
+ | ((params: PublicKeyParams<TMetadata>) => string);
71
76
 
72
77
  export type UpdateMyPresenceAction<TPresence extends JsonObject> =
73
78
  | Partial<TPresence>
@@ -1,4 +1,7 @@
1
- export const pickBy = <T extends Record<string, any>>(obj: T, by: (value: T[keyof T]) => boolean): Partial<T> => {
1
+ export const pickBy = <T extends Record<string, any>>(
2
+ obj: T,
3
+ by: (value: T[keyof T]) => boolean,
4
+ ): Partial<T> => {
2
5
  const result: Partial<T> = {};
3
6
  const keys: (keyof T)[] = Object.keys(obj);
4
7