@@ -193,29 +193,34 @@ export interface ISharedNotebook extends ISharedDocument {
193
193
deleteMetadata ( key : string ) : void ;
194
194
195
195
/**
196
- * Returns some metadata associated with the notebook.
196
+ * Returns all metadata associated with the notebook.
197
197
*
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.
200
204
*
201
205
* @param key Key to get from the metadata
202
206
* @returns Notebook's metadata.
203
207
*/
204
- getMetadata ( key ? : string ) : nbformat . INotebookMetadata ;
208
+ getMetadata ( key : string ) : PartialJSONValue | undefined ;
205
209
206
210
/**
207
- * Sets some metadata associated with the notebook.
211
+ * Sets all metadata associated with the notebook.
208
212
*
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.
211
219
*
212
- * @param metadata All Notebook's metadata or the key to set.
220
+ * @param metadata The key to set.
213
221
* @param value New metadata value
214
222
*/
215
- setMetadata (
216
- metadata : nbformat . INotebookMetadata | string ,
217
- value ?: PartialJSONValue
218
- ) : void ;
223
+ setMetadata ( metadata : string , value : PartialJSONValue ) : void ;
219
224
220
225
/**
221
226
* Updates the metadata associated with the notebook.
@@ -427,28 +432,34 @@ export interface ISharedBaseCell<
427
432
deleteMetadata ( key : string ) : void ;
428
433
429
434
/**
430
- * Returns some metadata associated with the cell.
435
+ * Returns all metadata associated with the cell.
431
436
*
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.
434
443
*
444
+ * @param key Metadata key to get
435
445
* @returns Cell's metadata.
436
446
*/
437
- getMetadata ( key ? : string ) : Partial < Metadata > ;
447
+ getMetadata ( key : string ) : PartialJSONValue | undefined ;
438
448
439
449
/**
440
450
* Sets some cell metadata.
441
451
*
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.
444
458
*
445
- * @param metadata Cell's metadata or key.
459
+ * @param metadata Cell's metadata key.
446
460
* @param value Metadata value
447
461
*/
448
- setMetadata (
449
- metadata : Partial < Metadata > | string ,
450
- value ?: PartialJSONValue
451
- ) : void ;
462
+ setMetadata ( metadata : string , value : PartialJSONValue ) : void ;
452
463
453
464
/**
454
465
* Serialize the model to JSON.
0 commit comments