Skip to content

Commit 4b4bde3

Browse files
committed
Add version property to JavaScript documents
1 parent a77d713 commit 4b4bde3

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

javascript/src/api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ export interface ISharedBase extends IObservableDisposable {
8282
* This is used by, for example, docregistry to share the file-path of the edited content.
8383
*/
8484
export interface ISharedDocument extends ISharedBase {
85+
/**
86+
* Document version
87+
*/
88+
readonly version: string;
89+
8590
/**
8691
* Document state
8792
*/

javascript/src/ycell.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ export class YBaseCell<Metadata extends nbformat.IBaseCellMetadata>
185185
this.ymodel.observeDeep(this._modelObserver);
186186
}
187187

188+
/**
189+
* Document version
190+
*/
191+
readonly version: string = '0.1.0';
192+
188193
/**
189194
* Cell notebook awareness or null if the cell is standalone.
190195
*/

javascript/src/yfile.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export class YFile
2727
this.ysource.observe(this._modelObserver);
2828
}
2929

30+
/**
31+
* Document version
32+
*/
33+
readonly version: string = '0.1.0';
34+
3035
/**
3136
* Creates a standalone YFile
3237
*/

javascript/src/ynotebook.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ export class YNotebook
6666
this.ymeta.observeDeep(this._onMetaChanged);
6767
}
6868

69+
/**
70+
* Document version
71+
*/
72+
readonly version: string = '0.1.0';
73+
6974
/**
7075
* Creates a standalone YNotebook
7176
*

0 commit comments

Comments
 (0)