(value: unknown)
| 267 | } |
| 268 | |
| 269 | function isNestedItxScopeContext(value: unknown): value is NestedItxScopeContext { |
| 270 | if (typeof value !== 'object' || value === null) { |
| 271 | return false |
| 272 | } |
| 273 | |
| 274 | const objectValue = value as Record<string, unknown> |
| 275 | return ( |
| 276 | objectValue['kind'] === 'nested' && |
| 277 | typeof objectValue['txId'] === 'string' && |
| 278 | typeof objectValue['scopeId'] === 'string' && |
| 279 | isItxScopeState(objectValue['scopeState']) |
| 280 | ) |
| 281 | } |
| 282 | |
| 283 | function isItxScopeState(value: unknown): value is ItxScopeState { |
| 284 | if (typeof value !== 'object' || value === null) { |
no test coverage detected