Browse documentation

NetworkManagerRuntime

Type. Environment objects used by NetworkManager.

Table of contents

Category

Type

Type import

ts
import type { NetworkManagerRuntime } from "valyrian.js/network";

Public signature

ts
type NetworkConnection = { effectiveType?: string; downlink?: number; rtt?: number; saveData?: boolean; addEventListener?: (event: string, listener: () => void) => void; removeEventListener?: (event: string, listener: () => void) => void; }; type NavigatorLike = { onLine: boolean; connection?: NetworkConnection; mozConnection?: NetworkConnection; webkitConnection?: NetworkConnection; }; type WindowLike = { addEventListener?: (event: string, listener: () => void) => void; removeEventListener?: (event: string, listener: () => void) => void; }; type NetworkManagerRuntime = { isNodeJs?: boolean; navigator?: NavigatorLike | null; window?: WindowLike | null; };

Type usage

NetworkManagerRuntime supplies the optional environment objects consumed by NetworkManagerOptions.