state
TelemetryState
Defined in: state.ts:14
Properties
enabled
enabled: boolean;
Defined in: state.ts:15
lastSentConfigs
lastSentConfigs: string[];
Defined in: state.ts:17
noticeVersion
noticeVersion: number;
Defined in: state.ts:16
reason?
reason?: string;
Defined in: state.ts:18
getStatePath()
function getStatePath(dir?): string;
Defined in: state.ts:21
Parameters
dir?
string = ...
Returns
string
readState()
function readState(path?): TelemetryState | null | undefined;
Defined in: state.ts:47
Reads the state file.
Parameters
path?
string = ...
Returns
TelemetryState | null | undefined
the state, undefined when the file does not exist, or null when
it is unreadable or corrupt (telemetry is then disabled for this run).
writeState()
function writeState(next, path?): TelemetryState;
Defined in: state.ts:69
Atomically writes the state (temp file + rename). Re-reads the current file
and merges lastSentConfigs first so parallel runs do not lose entries.
Parameters
next
Partial<TelemetryState>
path?
string = ...
Returns
the state that was written.