(file: SnapshotNotebookIdFileInput)
| 11 | * that matches one of them. |
| 12 | */ |
| 13 | export function isComposedInitMainFile(file: SnapshotNotebookIdFileInput): boolean { |
| 14 | const { notebooks, initNotebookId } = file.project |
| 15 | if (notebooks.length !== 2 || initNotebookId === undefined) { |
| 16 | return false |
| 17 | } |
| 18 | const initNotebook = notebooks.find(notebook => notebook.id === initNotebookId) |
| 19 | const nonInit = notebooks.find(notebook => notebook.id !== initNotebookId) |
| 20 | return initNotebook !== undefined && nonInit !== undefined |
| 21 | } |