@rbxts/replion 1.0.12 → 1.0.13

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/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  ## Install
4
4
  Install with [wally](https://wally.run/):\
5
- `Replion = "shouxtech/replion@1.0.12"`
5
+ `Replion = "shouxtech/replion@1.0.13"`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/replion",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "main": "src/init.lua",
6
6
  "scripts": {},
package/src/Server.lua CHANGED
@@ -236,4 +236,4 @@ Players.PlayerRemoving:Connect(function(player)
236
236
  Server._activeReplions[player] = nil;
237
237
  end);
238
238
 
239
- return Server;
239
+ return Server;
package/src/index.d.ts CHANGED
@@ -26,14 +26,7 @@ declare namespace Replion {
26
26
  data: T;
27
27
  }
28
28
 
29
- class Server<T extends object> {
30
- constructor(config: ServerConfig<T>);
31
-
32
- set<P extends Path<T>>(
33
- path: P,
34
- value: PathValue<T, P> | ((oldValue: PathValue<T, P>) => PathValue<T, P>),
35
- ): void;
36
-
29
+ interface ReplionBase<T extends object> {
37
30
  get(): T;
38
31
  get<P extends Path<T>>(path: P): PathValue<T, P>;
39
32
 
@@ -46,19 +39,21 @@ declare namespace Replion {
46
39
  destroy(): void;
47
40
  }
48
41
 
49
- class Client<T extends object> {
50
- static waitForReplion: <T extends object>(channel: string) => Client<T>;
51
-
52
- get(): T;
53
- get<P extends Path<T>>(path: P): PathValue<T, P>;
42
+ interface Server<T extends object> extends ReplionBase<T> { }
43
+ class Server<T extends object> {
44
+ constructor(config: ServerConfig<T>);
54
45
 
55
- observe(key: undefined, callback: (newValue: T, oldValue: Partial<T>) => void): Connection;
56
- observe<P extends Path<T>>(
46
+ set<P extends Path<T>>(
57
47
  path: P,
58
- callback: (newValue: PathValue<T, P>, oldValue: PathValue<T, P> | undefined) => void,
59
- ): Connection;
48
+ value: PathValue<T, P> | ((oldValue: PathValue<T, P>) => PathValue<T, P>),
49
+ ): void;
50
+ }
60
51
 
61
- destroy(): void;
52
+ interface Client<T extends object> extends ReplionBase<T> { }
53
+ class Client<T extends object> {
54
+ static waitForReplion: <T extends object>(channel: string) => Client<T>;
55
+
56
+ private constructor();
62
57
  }
63
58
  }
64
59