@fluidframework/shared-object-base 2.53.0 → 2.60.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.
- package/CHANGELOG.md +4 -0
- package/api-report/{shared-object-base.legacy.alpha.api.md → shared-object-base.legacy.beta.api.md} +9 -9
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/serializer.d.ts +1 -2
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js.map +1 -1
- package/dist/sharedObject.d.ts +3 -6
- package/dist/sharedObject.d.ts.map +1 -1
- package/dist/sharedObject.js +2 -4
- package/dist/sharedObject.js.map +1 -1
- package/dist/types.d.ts +2 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +2 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -4
- package/dist/utils.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/serializer.d.ts +1 -2
- package/lib/serializer.d.ts.map +1 -1
- package/lib/serializer.js.map +1 -1
- package/lib/sharedObject.d.ts +3 -6
- package/lib/sharedObject.d.ts.map +1 -1
- package/lib/sharedObject.js +2 -4
- package/lib/sharedObject.js.map +1 -1
- package/lib/types.d.ts +2 -4
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +2 -4
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +2 -4
- package/lib/utils.js.map +1 -1
- package/package.json +17 -17
- package/src/packageVersion.ts +1 -1
- package/src/serializer.ts +1 -2
- package/src/sharedObject.ts +3 -6
- package/src/types.ts +2 -4
- package/src/utils.ts +2 -4
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIErrorEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n} from \"@fluidframework/core-interfaces\";\nimport type { IChannel } from \"@fluidframework/datastore-definitions/internal\";\nimport type { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Events emitted by {@link ISharedObject}.\n * @legacy
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIErrorEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n} from \"@fluidframework/core-interfaces\";\nimport type { IChannel } from \"@fluidframework/datastore-definitions/internal\";\nimport type { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Events emitted by {@link ISharedObject}.\n * @legacy @beta\n */\nexport interface ISharedObjectEvents extends IErrorEvent {\n\t/**\n\t * Fires before an incoming operation (op) is applied to the shared object.\n\t *\n\t * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external\n\t * use.\n\t *\n\t * @eventProperty\n\t */\n\t(\n\t\tevent: \"pre-op\",\n\t\tlistener: (\n\t\t\top: ISequencedDocumentMessage,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n\n\t/**\n\t * Fires after an incoming op is applied to the shared object.\n\t *\n\t * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external\n\t * use.\n\t *\n\t * @eventProperty\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (\n\t\t\top: ISequencedDocumentMessage,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n}\n\n/**\n * Base interface for shared objects from which other interfaces extend.\n * @remarks\n * This interface is not intended to be implemented outside this repository:\n * implementers should migrate to using an existing implementation instead.\n * @privateRemarks\n * Implemented by {@link SharedObjectCore}.\n *\n * TODO:\n * The relationship between the \"shared object\" abstraction and \"channel\" abstraction should be clarified and/or unified.\n * 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\".\n * Additionally the docs here need to define what a shared object is, not just claim this interface is for them.\n * 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.\n * If not then more clarity is needed on what this interface specifically is, what the other \"shared object\" concept means and how they relate.\n * @legacy @beta\n */\nexport interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents>\n\textends IChannel,\n\t\tIEventProvider<TEvent> {\n\t/**\n\t * Binds the given shared object to its containing data store runtime, causing it to attach once\n\t * the runtime attaches.\n\t */\n\tbindToContext(): void;\n}\n"]}
|
package/lib/utils.d.ts
CHANGED
|
@@ -28,8 +28,7 @@ export declare function serializeHandles(value: unknown, serializer: IFluidSeria
|
|
|
28
28
|
* @param context - The handle context for the container
|
|
29
29
|
* @param bind - Bind any other handles we find in the object against this given handle.
|
|
30
30
|
* @returns The fully-plain object
|
|
31
|
-
* @legacy
|
|
32
|
-
* @alpha
|
|
31
|
+
* @legacy @beta
|
|
33
32
|
*/
|
|
34
33
|
export declare function makeHandlesSerializable(value: unknown, serializer: IFluidSerializer, bind: IFluidHandle): unknown;
|
|
35
34
|
/**
|
|
@@ -40,8 +39,7 @@ export declare function makeHandlesSerializable(value: unknown, serializer: IFlu
|
|
|
40
39
|
* @param serializer - The serializer that knows how to convert serializable-form handles into handle objects
|
|
41
40
|
* @param context - The handle context for the container
|
|
42
41
|
* @returns The mostly-plain object with handle objects within
|
|
43
|
-
* @legacy
|
|
44
|
-
* @alpha
|
|
42
|
+
* @legacy @beta
|
|
45
43
|
*/
|
|
46
44
|
export declare function parseHandles(value: unknown, serializer: IFluidSerializer): unknown;
|
|
47
45
|
/**
|
package/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAChB,MAAM,GAAG,SAAS,CAEpB;AAED
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAChB,MAAM,GAAG,SAAS,CAEpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAChB,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAElF;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GAAG,UAAU,GAC1B,qBAAqB,CAIvB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EACtC,KAAK,EAAE,CAAC,EACR,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAChB,CAAC,CASH;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,YAAY,GAAG,YAAY,CAAC,CAAC"}
|
package/lib/utils.js
CHANGED
|
@@ -27,8 +27,7 @@ export function serializeHandles(value, serializer, bind) {
|
|
|
27
27
|
* @param context - The handle context for the container
|
|
28
28
|
* @param bind - Bind any other handles we find in the object against this given handle.
|
|
29
29
|
* @returns The fully-plain object
|
|
30
|
-
* @legacy
|
|
31
|
-
* @alpha
|
|
30
|
+
* @legacy @beta
|
|
32
31
|
*/
|
|
33
32
|
export function makeHandlesSerializable(value, serializer, bind) {
|
|
34
33
|
return serializer.encode(value, bind);
|
|
@@ -41,8 +40,7 @@ export function makeHandlesSerializable(value, serializer, bind) {
|
|
|
41
40
|
* @param serializer - The serializer that knows how to convert serializable-form handles into handle objects
|
|
42
41
|
* @param context - The handle context for the container
|
|
43
42
|
* @returns The mostly-plain object with handle objects within
|
|
44
|
-
* @legacy
|
|
45
|
-
* @alpha
|
|
43
|
+
* @legacy @beta
|
|
46
44
|
*/
|
|
47
45
|
export function parseHandles(value, serializer) {
|
|
48
46
|
return serializer.decode(value);
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAI5E;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC/B,KAAc,EACd,UAA4B,EAC5B,IAAkB;IAElB,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACxE,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAI5E;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC/B,KAAc,EACd,UAA4B,EAC5B,IAAkB;IAElB,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CACtC,KAAc,EACd,UAA4B,EAC5B,IAAkB;IAElB,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,UAA4B;IACxE,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACtC,GAAW,EACX,OAA4B;IAE5B,MAAM,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACzC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAC1B,KAAQ,EACR,UAA4B,EAC5B,IAAkB;IAElB,sEAAsE;IACtE,0EAA0E;IAC1E,4EAA4E;IAC5E,sEAAsE;IACtE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE/B,wFAAwF;IACxF,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport type { IChannel } from \"@fluidframework/datastore-definitions/internal\";\nimport type { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { IFluidSerializer } from \"./serializer.js\";\n\n/**\n * Given a mostly-plain object that may have handle objects embedded within, return a string representation of an object\n * where the handle objects have been replaced with a serializable form.\n * @param value - The mostly-plain object\n * @param serializer - The serializer that knows how to convert handles into serializable format\n * @param context - The handle context for the container\n * @param bind - Bind any other handles we find in the object against this given handle.\n * @returns Result of strigifying an object\n * @internal\n */\nexport function serializeHandles(\n\tvalue: unknown,\n\tserializer: IFluidSerializer,\n\tbind: IFluidHandle,\n): string | undefined {\n\treturn value === undefined ? value : serializer.stringify(value, bind);\n}\n\n/**\n * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object\n * where any embedded IFluidHandles have been replaced with a serializable form.\n *\n * The original `input` object is not mutated. This method will shallowly clones all objects in the path from\n * the root to any replaced handles. (If no handles are found, returns the original object.)\n *\n * @param input - The mostly-plain object\n * @param context - The handle context for the container\n * @param bind - Bind any other handles we find in the object against this given handle.\n * @returns The fully-plain object\n * @legacy @beta\n */\nexport function makeHandlesSerializable(\n\tvalue: unknown,\n\tserializer: IFluidSerializer,\n\tbind: IFluidHandle,\n): unknown {\n\treturn serializer.encode(value, bind);\n}\n\n/**\n * Given a fully-plain object that may have serializable-form handles within, will return the mostly-plain object\n * with handle objects created instead.\n * @remarks Idempotent when called multiple times.\n * @param value - The fully-plain object\n * @param serializer - The serializer that knows how to convert serializable-form handles into handle objects\n * @param context - The handle context for the container\n * @returns The mostly-plain object with handle objects within\n * @legacy @beta\n */\nexport function parseHandles(value: unknown, serializer: IFluidSerializer): unknown {\n\treturn serializer.decode(value);\n}\n\n/**\n * Create a new summary containing one blob\n * @param key - the key for the blob in the summary\n * @param content - blob content\n * @returns The summary containing the blob\n * @internal\n */\nexport function createSingleBlobSummary(\n\tkey: string,\n\tcontent: string | Uint8Array,\n): ISummaryTreeWithStats {\n\tconst builder = new SummaryTreeBuilder();\n\tbuilder.addBlob(key, content);\n\treturn builder.getSummaryTree();\n}\n\n/**\n * Binds all handles found in `value` to `bind`. Does not modify original input.\n *\n * @internal\n */\nexport function bindHandles<T = unknown>(\n\tvalue: T,\n\tserializer: IFluidSerializer,\n\tbind: IFluidHandle,\n): T {\n\t// N.B. AB#7316 this could be made more efficient by writing an ad hoc\n\t// implementation that doesn't clone at all. Today the distinction between\n\t// this function and `encode` is purely semantic -- encoding both serializes\n\t// handles and binds them, but sometimes we only wish to do the latter\n\tserializer.encode(value, bind);\n\n\t// Return the input value so this function can be swapped in for makeHandlesSerializable\n\treturn value;\n}\n\n/**\n * Information about a Fluid channel.\n * @privateRemarks\n * This is distinct from {@link IChannel} as it omits the APIs used by the runtime to manage the channel and instead only has things which are useful (and safe) to expose to users of the channel.\n * @internal\n */\nexport type IChannelView = Pick<IChannel, \"id\" | \"attributes\" | \"isAttached\">;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/shared-object-base",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.60.0",
|
|
4
4
|
"description": "Fluid base class for shared distributed data structures",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,30 +69,30 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "~2.
|
|
73
|
-
"@fluidframework/container-definitions": "~2.
|
|
74
|
-
"@fluidframework/core-interfaces": "~2.
|
|
75
|
-
"@fluidframework/core-utils": "~2.
|
|
76
|
-
"@fluidframework/datastore": "~2.
|
|
77
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
78
|
-
"@fluidframework/driver-definitions": "~2.
|
|
79
|
-
"@fluidframework/id-compressor": "~2.
|
|
80
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
81
|
-
"@fluidframework/runtime-utils": "~2.
|
|
82
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
72
|
+
"@fluid-internal/client-utils": "~2.60.0",
|
|
73
|
+
"@fluidframework/container-definitions": "~2.60.0",
|
|
74
|
+
"@fluidframework/core-interfaces": "~2.60.0",
|
|
75
|
+
"@fluidframework/core-utils": "~2.60.0",
|
|
76
|
+
"@fluidframework/datastore": "~2.60.0",
|
|
77
|
+
"@fluidframework/datastore-definitions": "~2.60.0",
|
|
78
|
+
"@fluidframework/driver-definitions": "~2.60.0",
|
|
79
|
+
"@fluidframework/id-compressor": "~2.60.0",
|
|
80
|
+
"@fluidframework/runtime-definitions": "~2.60.0",
|
|
81
|
+
"@fluidframework/runtime-utils": "~2.60.0",
|
|
82
|
+
"@fluidframework/telemetry-utils": "~2.60.0",
|
|
83
83
|
"uuid": "^11.1.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
87
87
|
"@biomejs/biome": "~1.9.3",
|
|
88
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
89
|
-
"@fluid-private/test-pairwise-generator": "~2.
|
|
88
|
+
"@fluid-internal/mocha-test-setup": "~2.60.0",
|
|
89
|
+
"@fluid-private/test-pairwise-generator": "~2.60.0",
|
|
90
90
|
"@fluid-tools/build-cli": "^0.57.0",
|
|
91
91
|
"@fluidframework/build-common": "^2.0.3",
|
|
92
92
|
"@fluidframework/build-tools": "^0.57.0",
|
|
93
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
94
|
-
"@fluidframework/shared-object-base-previous": "npm:@fluidframework/shared-object-base@2.
|
|
95
|
-
"@fluidframework/test-runtime-utils": "~2.
|
|
93
|
+
"@fluidframework/eslint-config-fluid": "^6.0.0",
|
|
94
|
+
"@fluidframework/shared-object-base-previous": "npm:@fluidframework/shared-object-base@2.53.0",
|
|
95
|
+
"@fluidframework/test-runtime-utils": "~2.60.0",
|
|
96
96
|
"@microsoft/api-extractor": "7.52.8",
|
|
97
97
|
"@types/benchmark": "^2.1.0",
|
|
98
98
|
"@types/mocha": "^10.0.10",
|
package/src/packageVersion.ts
CHANGED
package/src/serializer.ts
CHANGED
package/src/sharedObject.ts
CHANGED
|
@@ -83,8 +83,7 @@ interface ProcessTelemetryProperties {
|
|
|
83
83
|
*
|
|
84
84
|
* TODO:
|
|
85
85
|
* This class should eventually be made internal, as custom subclasses of it outside this repository are intended to be made unsupported in the future.
|
|
86
|
-
* @legacy
|
|
87
|
-
* @alpha
|
|
86
|
+
* @legacy @beta
|
|
88
87
|
*/
|
|
89
88
|
export abstract class SharedObjectCore<
|
|
90
89
|
TEvent extends ISharedObjectEvents = ISharedObjectEvents,
|
|
@@ -789,8 +788,7 @@ export abstract class SharedObjectCore<
|
|
|
789
788
|
* This class is badly named.
|
|
790
789
|
* Once it becomes `@internal` "SharedObjectCore" should probably become "SharedObject"
|
|
791
790
|
* and this class should be renamed to something like "SharedObjectSynchronous".
|
|
792
|
-
* @legacy
|
|
793
|
-
* @alpha
|
|
791
|
+
* @legacy @beta
|
|
794
792
|
*/
|
|
795
793
|
export abstract class SharedObject<
|
|
796
794
|
TEvent extends ISharedObjectEvents = ISharedObjectEvents,
|
|
@@ -979,8 +977,7 @@ export abstract class SharedObject<
|
|
|
979
977
|
* This does not extend {@link SharedObjectKind} since doing so would prevent implementing this interface in type safe code.
|
|
980
978
|
* Any implementation of this can safely be used as a {@link SharedObjectKind} with an explicit type conversion,
|
|
981
979
|
* but doing so is typically not needed as {@link createSharedObjectKind} is used to produce values that are both types simultaneously.
|
|
982
|
-
* @legacy
|
|
983
|
-
* @alpha
|
|
980
|
+
* @legacy @beta
|
|
984
981
|
*/
|
|
985
982
|
export interface ISharedObjectKind<TSharedObject> {
|
|
986
983
|
/**
|
package/src/types.ts
CHANGED
|
@@ -13,8 +13,7 @@ import type { ISequencedDocumentMessage } from "@fluidframework/driver-definitio
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Events emitted by {@link ISharedObject}.
|
|
16
|
-
* @legacy
|
|
17
|
-
* @alpha
|
|
16
|
+
* @legacy @beta
|
|
18
17
|
*/
|
|
19
18
|
export interface ISharedObjectEvents extends IErrorEvent {
|
|
20
19
|
/**
|
|
@@ -66,8 +65,7 @@ export interface ISharedObjectEvents extends IErrorEvent {
|
|
|
66
65
|
* Additionally the docs here need to define what a shared object is, not just claim this interface is for them.
|
|
67
66
|
* 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
67
|
* If not then more clarity is needed on what this interface specifically is, what the other "shared object" concept means and how they relate.
|
|
69
|
-
* @legacy
|
|
70
|
-
* @alpha
|
|
68
|
+
* @legacy @beta
|
|
71
69
|
*/
|
|
72
70
|
export interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents>
|
|
73
71
|
extends IChannel,
|
package/src/utils.ts
CHANGED
|
@@ -39,8 +39,7 @@ export function serializeHandles(
|
|
|
39
39
|
* @param context - The handle context for the container
|
|
40
40
|
* @param bind - Bind any other handles we find in the object against this given handle.
|
|
41
41
|
* @returns The fully-plain object
|
|
42
|
-
* @legacy
|
|
43
|
-
* @alpha
|
|
42
|
+
* @legacy @beta
|
|
44
43
|
*/
|
|
45
44
|
export function makeHandlesSerializable(
|
|
46
45
|
value: unknown,
|
|
@@ -58,8 +57,7 @@ export function makeHandlesSerializable(
|
|
|
58
57
|
* @param serializer - The serializer that knows how to convert serializable-form handles into handle objects
|
|
59
58
|
* @param context - The handle context for the container
|
|
60
59
|
* @returns The mostly-plain object with handle objects within
|
|
61
|
-
* @legacy
|
|
62
|
-
* @alpha
|
|
60
|
+
* @legacy @beta
|
|
63
61
|
*/
|
|
64
62
|
export function parseHandles(value: unknown, serializer: IFluidSerializer): unknown {
|
|
65
63
|
return serializer.decode(value);
|