Skip to content

Instantly share code, notes, and snippets.

@thisisjofrank
Created April 22, 2022 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thisisjofrank/85b27bfd135f83b9a879e15014ace31b to your computer and use it in GitHub Desktop.
Save thisisjofrank/85b27bfd135f83b9a879e15014ace31b to your computer and use it in GitHub Desktop.
Let's start by defining a Swarm class in a file called Swarm.ts, and some member variables
import { Types } from 'ably';
import Ably from 'ably/promises';
export default class Swarm {
public readonly id: string;
private readonly ably: Ably.Realtime;
private readonly channel: Types.RealtimeChannelPromise;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment