@palantir/pack.state.core 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -241,7 +241,6 @@ export abstract class BaseYjsDocumentService<TDoc extends InternalYjsDoc = Inter
241
241
  protected readonly createBaseInternalDoc = <T extends DocumentSchema>(
242
242
  ref: DocumentRef<T>,
243
243
  metadata: DocumentMetadata | undefined,
244
- yDoc?: Y.Doc,
245
244
  ): InternalYjsDoc => {
246
245
  const schema = ref.schema;
247
246
  return {
@@ -267,7 +266,7 @@ export abstract class BaseYjsDocumentService<TDoc extends InternalYjsDoc = Inter
267
266
  docStateSubscribers: new Set(),
268
267
  metadataSubscribers: new Set(),
269
268
  recordSubscriptions: new Map(),
270
- yDoc: yDoc || this.initializeYDoc(schema),
269
+ yDoc: this.initializeYDoc(schema),
271
270
  yDocUpdateHandler: undefined,
272
271
  yjsCollectionHandlers: new Map(),
273
272
  };
@@ -27,7 +27,6 @@ import type {
27
27
  PresenceEvent,
28
28
  PresenceSubscriptionOptions,
29
29
  } from "@palantir/pack.document-schema.model-types";
30
- import type * as Y from "yjs";
31
30
  import { createDocumentServiceConfig } from "../DocumentServiceModule.js";
32
31
  import { createDocRef } from "../types/DocumentRefImpl.js";
33
32
  import type { DocumentService } from "../types/DocumentService.js";
@@ -74,9 +73,8 @@ class InMemoryDocumentService extends BaseYjsDocumentService {
74
73
  override createInternalDoc(
75
74
  ref: DocumentRef,
76
75
  metadata?: DocumentMetadata,
77
- yDoc?: Y.Doc,
78
76
  ): InternalYjsDoc {
79
- return this.createBaseInternalDoc(ref, metadata, yDoc);
77
+ return this.createBaseInternalDoc(ref, metadata);
80
78
  }
81
79
 
82
80
  get hasMetadataSubscriptions() {