( legacyState: Record<string, unknown>, properties: readonly string[] )
| 122 | } |
| 123 | |
| 124 | function extractDomainState( |
| 125 | legacyState: Record<string, unknown>, |
| 126 | properties: readonly string[] |
| 127 | ): Record<string, unknown> { |
| 128 | const domainState: Record<string, unknown> = {}; |
| 129 | for (const prop of properties) { |
| 130 | if (prop in legacyState) { |
| 131 | domainState[prop] = legacyState[prop]; |
| 132 | } |
| 133 | } |
| 134 | return domainState; |
| 135 | } |
| 136 | |
| 137 | function saveDomainStore(key: string, state: Record<string, unknown>): void { |
| 138 | if (Object.keys(state).length > 0) { |
no outgoing calls
no test coverage detected