lint - fixes #223

This commit is contained in:
Kevin Jahns 2020-07-22 12:32:34 +02:00
parent 38eb2e502c
commit 68109b033f
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import {
ContentAny,
ContentBinary,
getItemCleanStart,
AbstractUpdateEncoder, Doc, Snapshot, Transaction, EventHandler, YEvent, Item, // eslint-disable-line
YText, YArray, AbstractUpdateEncoder, Doc, Snapshot, Transaction, EventHandler, YEvent, Item, // eslint-disable-line
} from '../internals.js'
import * as map from 'lib0/map.js'
@ -157,7 +157,7 @@ export const findMarker = (yarray, index) => {
// window.lengthes.push(marker.index - pindex)
// console.log('distance', marker.index - pindex, 'len', p && p.parent.length)
// }
if (marker !== null && math.abs(marker.index - pindex) < p.parent.length / maxSearchMarker) {
if (marker !== null && math.abs(marker.index - pindex) < /** @type {YText|YArray<any>} */ (p.parent).length / maxSearchMarker) {
// adjust existing marker
overwriteMarker(marker, p, pindex)
return marker

View File

@ -293,7 +293,7 @@ const tryGc = () => {
* @param {t.TestCase} tc
*/
export const testLargeFragmentedDocument = tc => {
const itemsToInsert = 2000000
const itemsToInsert = 5000000
let update = /** @type {any} */ (null)
;(() => {
const doc1 = new Y.Doc()