Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rbxts/charm

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rbxts/charm - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

2

package.json
{
"name": "@rbxts/charm",
"version": "0.6.1",
"version": "0.6.2",
"description": "Atomic state management for Roblox",

@@ -5,0 +5,0 @@ "main": "src/init.lua",

@@ -53,2 +53,3 @@ export = Charm;

type AtomMap = Record<string, Atom<any>>;
type MoleculeMap = Record<string, Molecule<any>>;

@@ -229,3 +230,3 @@ interface AtomOptions<State> {

*/
server: <Atoms extends AtomMap>(options: ServerOptions<Atoms>) => ServerSyncer<Atoms>;
server: <Molecules extends MoleculeMap>(options: ServerOptions<Molecules>) => ServerSyncer<Molecules>;
/**

@@ -285,5 +286,5 @@ * Checks whether a value is `None`. If `true`, the value is scheduled to be

*/
type SyncPayload<Atoms extends AtomMap> =
| { type: "init"; data: StateOfMap<Atoms> }
| { type: "patch"; data: SyncPatch<StateOfMap<Atoms>> };
type SyncPayload<Molecules extends MoleculeMap> =
| { type: "init"; data: StateOfMap<Molecules> }
| { type: "patch"; data: SyncPatch<StateOfMap<Molecules>> };

@@ -297,7 +298,7 @@ interface ClientOptions<Atoms extends AtomMap> {

interface ServerOptions<Atoms extends AtomMap> {
interface ServerOptions<Molecules extends MoleculeMap> {
/**
* The atoms to synchronize with the client.
*/
atoms: Atoms;
atoms: Molecules;
/**

@@ -331,3 +332,3 @@ * The interval at which to send patches to the client, in seconds.

interface ServerSyncer<Atoms extends AtomMap> {
interface ServerSyncer<Molecules extends MoleculeMap> {
/**

@@ -344,3 +345,3 @@ * Sets up a subscription to each atom that schedules a patch to be sent to

*/
connect(callback: (player: Player, ...payloads: SyncPayload<Atoms>[]) => void): Cleanup;
connect(callback: (player: Player, ...payloads: SyncPayload<Molecules>[]) => void): Cleanup;
/**

@@ -347,0 +348,0 @@ * Hydrates the client's state with the server's state. This should be

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc