API REFERENCE

NetworkGraphStreamSource

The NetworkGraphStreamSource type declaration and related types. Optional fields are marked with ?.

Type declaration

typescript
export interface NetworkGraphStreamSource {
  readonly length: number;
  readonly capacity: number;
  readonly dropped: number;
  push(link: NetworkGraphLinkInput): void;
  pushBatch(links: ReadonlyArray<NetworkGraphLinkInput>): void;
  shift(count: number): void;
  replace(links: ReadonlyArray<NetworkGraphLinkInput>): void;
  snapshot(): NetworkGraphLinkInput[];
  subscribe(listener: (event: NetworkGraphStreamEvent) => void): () => void;
}