MCPcopy Index your code
hub / github.com/callstack/agent-device / assignReplayMetadataValue

Function assignReplayMetadataValue

src/replay/script.ts:170–184  ·  view source on GitHub ↗
(
  metadata: ReplayScriptMetadata,
  key: Key,
  value: NonNullable<ReplayScriptMetadata[Key]>,
)

Source from the content-addressed store, hash-verified

168}
169
170function assignReplayMetadataValue<Key extends keyof ReplayScriptMetadata>(
171 metadata: ReplayScriptMetadata,
172 key: Key,
173 value: NonNullable<ReplayScriptMetadata[Key]>,
174): void {
175 const previous = metadata[key];
176 if (previous !== undefined) {
177 const duplicateMessage =
178 previous === value
179 ? `Duplicate replay test metadata "${key}" in context header.`
180 : `Conflicting replay test metadata "${key}" in context header: ${String(previous)} vs ${String(value)}.`;
181 throw new AppError('INVALID_ARGS', duplicateMessage);
182 }
183 metadata[key] = value as ReplayScriptMetadata[Key];
184}
185
186// fallow-ignore-next-line complexity
187function parseReplayScriptLine(line: string): SessionAction | null {

Callers 1

readReplayScriptMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…