fix gc & proper options typings for Y.Doc, fixes #176

This commit is contained in:
Kevin Jahns 2019-12-10 17:51:25 +01:00
parent 7f0e25dcba
commit 22917bca19

View File

@ -23,11 +23,12 @@ import * as map from 'lib0/map.js'
*/
export class Doc extends Observable {
/**
* @param {Object|undefined} conf configuration
* @param {Object} conf configuration
* @param {boolean} [conf.gc] Disable garbage collection (default: gc=true)
*/
constructor (conf = {}) {
constructor ({ gc = true } = {}) {
super()
this.gc = conf.gc || true
this.gc = gc
this.clientID = random.uint32()
/**
* @type {Map<string, AbstractType<YEvent>>}