(value: unknown)
| 182 | } |
| 183 | |
| 184 | function sanitizeNotesState(value: unknown): NotesState { |
| 185 | const source = asRecord(value) |
| 186 | const state: NotesState = {} |
| 187 | |
| 188 | if (typeof source.noteId === 'number') |
| 189 | state.noteId = source.noteId |
| 190 | if (typeof source.folderId === 'number') |
| 191 | state.folderId = source.folderId |
| 192 | if (typeof source.tagId === 'number') |
| 193 | state.tagId = source.tagId |
| 194 | if (typeof source.libraryFilter === 'string') |
| 195 | state.libraryFilter = source.libraryFilter |
| 196 | return state |
| 197 | } |
| 198 | |
| 199 | function getLegacyCodeLayoutMode( |
| 200 | source: Record<string, unknown>, |
no test coverage detected