@fluidframework/shared-object-base 2.33.2 → 2.40.0-336023
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.
- package/api-report/shared-object-base.legacy.alpha.api.md +6 -5
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/sharedObject.d.ts +46 -11
- package/dist/sharedObject.d.ts.map +1 -1
- package/dist/sharedObject.js +34 -11
- package/dist/sharedObject.js.map +1 -1
- package/dist/types.d.ts +13 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/sharedObject.d.ts +46 -11
- package/lib/sharedObject.d.ts.map +1 -1
- package/lib/sharedObject.js +34 -11
- package/lib/sharedObject.js.map +1 -1
- package/lib/types.d.ts +13 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +14 -14
- package/src/packageVersion.ts +1 -1
- package/src/sharedObject.ts +32 -13
- package/src/types.ts +13 -1
package/src/sharedObject.ts
CHANGED
|
@@ -70,7 +70,18 @@ interface ProcessTelemetryProperties {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Base class from which all shared objects derive.
|
|
73
|
+
* Base class from which all {@link ISharedObject|shared objects} derive.
|
|
74
|
+
* @remarks
|
|
75
|
+
* This class implements common behaviors that implementations of {@link ISharedObject} may want to reuse.
|
|
76
|
+
* Even more such behaviors are implemented in the {@link SharedObject} class.
|
|
77
|
+
* @privateRemarks
|
|
78
|
+
* Currently some documentation (like the above) implies that this is supposed to be the only implementation of ISharedObject, which is both package-exported and not `@sealed`.
|
|
79
|
+
* This situation should be clarified to indicate if other implementations of ISharedObject are allowed and just currently don't exist,
|
|
80
|
+
* or if the intention is that no other implementations should exist and creating some might break things.
|
|
81
|
+
* As part of this, any existing implementations of ISharedObject (via SharedObjectCore or otherwise) in use by legacy API users will need to be considered.
|
|
82
|
+
*
|
|
83
|
+
* TODO:
|
|
84
|
+
* This class should eventually be made internal, as custom subclasses of it outside this repository are intended to be made unsupported in the future.
|
|
74
85
|
* @legacy
|
|
75
86
|
* @alpha
|
|
76
87
|
*/
|
|
@@ -129,14 +140,18 @@ export abstract class SharedObjectCore<
|
|
|
129
140
|
return this._connected;
|
|
130
141
|
}
|
|
131
142
|
|
|
132
|
-
/**
|
|
133
|
-
* @param id - The id of the shared object
|
|
134
|
-
* @param runtime - The IFluidDataStoreRuntime which contains the shared object
|
|
135
|
-
* @param attributes - Attributes of the shared object
|
|
136
|
-
*/
|
|
137
143
|
constructor(
|
|
144
|
+
/**
|
|
145
|
+
* The ID of the shared object.
|
|
146
|
+
*/
|
|
138
147
|
public id: string,
|
|
148
|
+
/**
|
|
149
|
+
* The runtime instance that contains the Shared Object.
|
|
150
|
+
*/
|
|
139
151
|
protected runtime: IFluidDataStoreRuntime,
|
|
152
|
+
/**
|
|
153
|
+
* The attributes of the Shared Object.
|
|
154
|
+
*/
|
|
140
155
|
public readonly attributes: IChannelAttributes,
|
|
141
156
|
) {
|
|
142
157
|
super((event: EventEmitterEventType, e: unknown) =>
|
|
@@ -729,8 +744,14 @@ export abstract class SharedObjectCore<
|
|
|
729
744
|
}
|
|
730
745
|
|
|
731
746
|
/**
|
|
732
|
-
*
|
|
733
|
-
*
|
|
747
|
+
* Helper for implementing {@link ISharedObject} with simplified, synchronous summarization and garbage collection.
|
|
748
|
+
* @remarks
|
|
749
|
+
* DDS implementations with async and incremental summarization should extend {@link SharedObjectCore} directly instead.
|
|
750
|
+
* @privateRemarks
|
|
751
|
+
* TODO:
|
|
752
|
+
* This class is badly named.
|
|
753
|
+
* Once it becomes `@internal` "SharedObjectCore" should probably become "SharedObject"
|
|
754
|
+
* and this class should be renamed to something like "SharedObjectSynchronous".
|
|
734
755
|
* @legacy
|
|
735
756
|
* @alpha
|
|
736
757
|
*/
|
|
@@ -762,15 +783,13 @@ export abstract class SharedObject<
|
|
|
762
783
|
return this._serializer;
|
|
763
784
|
}
|
|
764
785
|
|
|
765
|
-
/**
|
|
766
|
-
* @param id - The id of the shared object
|
|
767
|
-
* @param runtime - The IFluidDataStoreRuntime which contains the shared object
|
|
768
|
-
* @param attributes - Attributes of the shared object
|
|
769
|
-
*/
|
|
770
786
|
constructor(
|
|
771
787
|
id: string,
|
|
772
788
|
runtime: IFluidDataStoreRuntime,
|
|
773
789
|
attributes: IChannelAttributes,
|
|
790
|
+
/**
|
|
791
|
+
* The prefix to use for telemetry events emitted by this object.
|
|
792
|
+
*/
|
|
774
793
|
private readonly telemetryContextPrefix: string,
|
|
775
794
|
) {
|
|
776
795
|
super(id, runtime, attributes);
|
package/src/types.ts
CHANGED
|
@@ -53,7 +53,19 @@ export interface ISharedObjectEvents extends IErrorEvent {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Base interface for shared objects from which other interfaces
|
|
56
|
+
* Base interface for shared objects from which other interfaces extend.
|
|
57
|
+
* @remarks
|
|
58
|
+
* This interface is not intended to be implemented outside this repository:
|
|
59
|
+
* implementers should migrate to using an existing implementation instead.
|
|
60
|
+
* @privateRemarks
|
|
61
|
+
* Implemented by {@link SharedObjectCore}.
|
|
62
|
+
*
|
|
63
|
+
* TODO:
|
|
64
|
+
* The relationship between the "shared object" abstraction and "channel" abstraction should be clarified and/or unified.
|
|
65
|
+
* Either there should be a single named abstraction or the docs here need to make it clear why adding events and bindToContext to a channel makes it a "shared object".
|
|
66
|
+
* Additionally the docs here need to define what a shared object is, not just claim this interface is for them.
|
|
67
|
+
* If the intention is that the "shared object" concept `IFluidLoadable` mentions is only ever implemented by this interface then even more concept unification should be done.
|
|
68
|
+
* If not then more clarity is needed on what this interface specifically is, what the other "shared object" concept means and how they relate.
|
|
57
69
|
* @legacy
|
|
58
70
|
* @alpha
|
|
59
71
|
*/
|