pcp
Version:
A PeerCast protocol client module for Node.js
19 lines (18 loc) • 866 B
TypeScript
export default class Atom {
readonly name: string;
readonly content: ArrayBuffer | null;
readonly children: ReadonlyArray<Atom> | null;
static create(src: [string, string, any]): Atom;
private static createChildren;
static createContent(name: string, content: ArrayBuffer): Atom;
static createByteContent(name: string, content: number): Atom;
static createShortContent(name: string, content: number): Atom;
static createIntContent(name: string, content: number): Atom;
static createStringContent(name: string, content: string): Atom;
static createString2Content(name: string, content: string): Atom;
static createURLContent(name: string, content: string): Atom;
static createParent(name: string, children: ReadonlyArray<Atom>): Atom;
private constructor();
toJSON(): string;
private toJSONRecursive;
}