@@ -193,29 +193,34 @@ export interface ISharedNotebook extends ISharedDocument {
193193 deleteMetadata ( key : string ) : void ;
194194
195195 /**
196- * Returns some metadata associated with the notebook.
196+ * Returns all metadata associated with the notebook.
197197 *
198- * If no `key` is provided, it will return all metadata.
199- * Else it will return the value for that key.
198+ * @returns Notebook's metadata.
199+ */
200+ getMetadata ( ) : nbformat . INotebookMetadata ;
201+
202+ /**
203+ * Returns a metadata associated with the notebook.
200204 *
201205 * @param key Key to get from the metadata
202206 * @returns Notebook's metadata.
203207 */
204- getMetadata ( key ? : string ) : nbformat . INotebookMetadata ;
208+ getMetadata ( key : string ) : PartialJSONValue | undefined ;
205209
206210 /**
207- * Sets some metadata associated with the notebook.
211+ * Sets all metadata associated with the notebook.
208212 *
209- * If only one argument is provided, it will override all notebook metadata.
210- * Otherwise a single key will be set to a new value.
213+ * @param metadata All Notebook's metadata.
214+ */
215+ setMetadata ( metadata : nbformat . INotebookMetadata ) : void ;
216+
217+ /**
218+ * Sets a metadata associated with the notebook.
211219 *
212- * @param metadata All Notebook's metadata or the key to set.
220+ * @param metadata The key to set.
213221 * @param value New metadata value
214222 */
215- setMetadata (
216- metadata : nbformat . INotebookMetadata | string ,
217- value ?: PartialJSONValue
218- ) : void ;
223+ setMetadata ( metadata : string , value : PartialJSONValue ) : void ;
219224
220225 /**
221226 * Updates the metadata associated with the notebook.
@@ -427,28 +432,34 @@ export interface ISharedBaseCell<
427432 deleteMetadata ( key : string ) : void ;
428433
429434 /**
430- * Returns some metadata associated with the cell.
435+ * Returns all metadata associated with the cell.
431436 *
432- * If a `key` is provided, returns the metadata value.
433- * Otherwise returns all metadata
437+ * @returns Cell's metadata.
438+ */
439+ getMetadata ( ) : Partial < Metadata > ;
440+
441+ /**
442+ * Returns a metadata associated with the cell.
434443 *
444+ * @param key Metadata key to get
435445 * @returns Cell's metadata.
436446 */
437- getMetadata ( key ? : string ) : Partial < Metadata > ;
447+ getMetadata ( key : string ) : PartialJSONValue | undefined ;
438448
439449 /**
440450 * Sets some cell metadata.
441451 *
442- * If only one argument is provided, it will override all cell metadata.
443- * Otherwise a single key will be set to a new value.
452+ * @param metadata Cell's metadata.
453+ */
454+ setMetadata ( metadata : Partial < Metadata > ) : void ;
455+
456+ /**
457+ * Sets a cell metadata.
444458 *
445- * @param metadata Cell's metadata or key.
459+ * @param metadata Cell's metadata key.
446460 * @param value Metadata value
447461 */
448- setMetadata (
449- metadata : Partial < Metadata > | string ,
450- value ?: PartialJSONValue
451- ) : void ;
462+ setMetadata ( metadata : string , value : PartialJSONValue ) : void ;
452463
453464 /**
454465 * Serialize the model to JSON.
0 commit comments