(value: unknown)
| 152 | } |
| 153 | |
| 154 | function sanitizeCodeState(value: unknown): CodeState { |
| 155 | const source = asRecord(value) |
| 156 | const state: CodeState = {} |
| 157 | |
| 158 | if (typeof source.snippetId === 'number') |
| 159 | state.snippetId = source.snippetId |
| 160 | if (typeof source.snippetContentIndex === 'number') |
| 161 | state.snippetContentIndex = source.snippetContentIndex |
| 162 | if (typeof source.folderId === 'number') |
| 163 | state.folderId = source.folderId |
| 164 | if (typeof source.tagId === 'number') |
| 165 | state.tagId = source.tagId |
| 166 | if (typeof source.libraryFilter === 'string') |
| 167 | state.libraryFilter = source.libraryFilter |
| 168 | return state |
| 169 | } |
| 170 | |
| 171 | function sanitizeHttpState(value: unknown): HttpState { |
| 172 | const source = asRecord(value) |
no test coverage detected