@@ -193,29 +193,39 @@ 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.
200- *
201- * @param key Key to get from the metadata
202198 * @returns Notebook's metadata.
203199 */
204- getMetadata ( key ?: string ) : nbformat . INotebookMetadata ;
205-
206- /**
207- * Sets some metadata associated with the notebook.
208- *
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.
211- *
212- * @param metadata All Notebook's metadata or the key to set.
213- * @param value New metadata value
214- */
215- setMetadata (
216- metadata : nbformat . INotebookMetadata | string ,
217- value ?: PartialJSONValue
218- ) : void ;
200+ getMetadata ( ) : nbformat . INotebookMetadata ;
201+
202+ /**
203+ * Returns a metadata associated with the notebook.
204+ *
205+ * @param key Key to get from the metadata
206+ * @returns Notebook's metadata.
207+ */
208+ getMetadata ( key : string ) : PartialJSONValue | undefined ;
209+
210+ /**
211+ * Sets all metadata associated with the notebook.
212+ *
213+ * @param metadata All Notebook's metadata.
214+ */
215+ setMetadata (
216+ metadata : nbformat . INotebookMetadata ,
217+ ) : void ;
218+
219+ /**
220+ * Sets a metadata associated with the notebook.
221+ *
222+ * @param metadata The key to set.
223+ * @param value New metadata value
224+ */
225+ setMetadata (
226+ metadata : string ,
227+ value : PartialJSONValue
228+ ) : void ;
219229
220230 /**
221231 * Updates the metadata associated with the notebook.
@@ -427,27 +437,38 @@ export interface ISharedBaseCell<
427437 deleteMetadata ( key : string ) : void ;
428438
429439 /**
430- * Returns some metadata associated with the cell.
440+ * Returns all metadata associated with the cell.
431441 *
432- * If a `key` is provided, returns the metadata value.
433- * Otherwise returns all metadata
442+ * @returns Cell's metadata.
443+ */
444+ getMetadata ( ) : Partial < Metadata > ;
445+
446+ /**
447+ * Returns a metadata associated with the cell.
434448 *
449+ * @param key Metadata key to get
435450 * @returns Cell's metadata.
436451 */
437- getMetadata ( key ? : string ) : Partial < Metadata > ;
452+ getMetadata ( key : string ) : PartialJSONValue | undefined ;
438453
439454 /**
440455 * Sets some cell metadata.
441456 *
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.
457+ * @param metadata Cell's metadata.
458+ */
459+ setMetadata (
460+ metadata : Partial < Metadata > ,
461+ ) : void ;
462+
463+ /**
464+ * Sets a cell metadata.
444465 *
445- * @param metadata Cell's metadata or key.
466+ * @param metadata Cell's metadata key.
446467 * @param value Metadata value
447468 */
448469 setMetadata (
449- metadata : Partial < Metadata > | string ,
450- value ? : PartialJSONValue
470+ metadata : string ,
471+ value : PartialJSONValue
451472 ) : void ;
452473
453474 /**
0 commit comments