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

Function normalizeRuntimeHints

src/client/client-normalizers.ts:177–191  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

175}
176
177export function normalizeRuntimeHints(value: unknown): SessionRuntimeHints | undefined {
178 if (!isRecord(value)) return undefined;
179 const platform = value.platform;
180 const metroHost = readOptionalString(value, 'metroHost');
181 const metroPort = typeof value.metroPort === 'number' ? value.metroPort : undefined;
182 const bundleUrl = readOptionalString(value, 'bundleUrl');
183 const launchUrl = readOptionalString(value, 'launchUrl');
184 return {
185 platform: platform === 'ios' || platform === 'android' ? platform : undefined,
186 metroHost,
187 metroPort,
188 bundleUrl,
189 launchUrl,
190 };
191}
192
193export function normalizeOpenDevice(
194 value: Record<string, unknown>,

Callers 1

createAgentDeviceClientFunction · 0.90

Calls 2

isRecordFunction · 0.90
readOptionalStringFunction · 0.90

Tested by

no test coverage detected