(surfaceId: string)
| 41 | * Get or create preserved state for a surface |
| 42 | */ |
| 43 | export function getPreservedState(surfaceId: string): PreservedState { |
| 44 | let state = surfaceStates.get(surfaceId); |
| 45 | if (!state) { |
| 46 | state = createPreservedState(); |
| 47 | surfaceStates.set(surfaceId, state); |
| 48 | } |
| 49 | return state; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Clear preserved state for a surface |
no test coverage detected