MCPcopy Create free account
hub / github.com/Noumena-Network/code / getUpdatedInputOrFallback

Function getUpdatedInputOrFallback

src/utils/permissions/permissions.ts:1483–1492  ·  view source on GitHub ↗

* Extract updatedInput from a permission result, falling back to the original input. * Handles the case where some PermissionResult variants don't have updatedInput.

(
  permissionResult: PermissionResult,
  fallback: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

1481 * Handles the case where some PermissionResult variants don't have updatedInput.
1482 */
1483function getUpdatedInputOrFallback(
1484 permissionResult: PermissionResult,
1485 fallback: Record<string, unknown>,
1486): Record<string, unknown> {
1487 return (
1488 ('updatedInput' in permissionResult
1489 ? permissionResult.updatedInput
1490 : undefined) ?? fallback
1491 )
1492}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected