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

Function withTargetDeviceResolutionScope

src/core/dispatch-resolve.ts:228–236  ·  view source on GitHub ↗
(
  provider: DeviceInventoryProvider | undefined,
  task: () => Promise<T>,
)

Source from the content-addressed store, hash-verified

226}
227
228export async function withTargetDeviceResolutionScope<T>(
229 provider: DeviceInventoryProvider | undefined,
230 task: () => Promise<T>,
231): Promise<T> {
232 return await withDeviceInventoryProvider(
233 provider,
234 async () => await withResolveTargetDeviceCacheScope(task),
235 );
236}
237
238export async function listDeviceInventory(request: DeviceInventoryRequest): Promise<DeviceInfo[]> {
239 return (await readInjectedDeviceInventory(request)) ?? (await listLocalDeviceInventory(request));

Tested by 1