@fluidframework/core-interfaces 2.50.0-345060 → 2.50.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 +8 -0
- package/api-report/core-interfaces.legacy.alpha.api.md +0 -2
- package/dist/handles.d.ts +0 -7
- package/dist/handles.d.ts.map +1 -1
- package/dist/handles.js.map +1 -1
- package/lib/handles.d.ts +0 -7
- package/lib/handles.d.ts.map +1 -1
- package/lib/handles.js.map +1 -1
- package/package.json +9 -2
- package/src/handles.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @fluidframework/core-interfaces
|
|
2
2
|
|
|
3
|
+
## 2.50.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- IFluidHandleInternal.bind (deprecated) has been removed ([#24974](https://github.com/microsoft/FluidFramework/pull/24974)) [07e183795f](https://github.com/microsoft/FluidFramework/commit/07e183795fa8118fae717c118ab7a7945ac1ad57)
|
|
8
|
+
|
|
9
|
+
`IFluidHandleInternal.bind` was deprecated in 2.40 and has now been removed. See [release notes entry](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.40.0#user-content-ifluidhandleinternalbind-has-been-deprecated-24553) for more details.
|
|
10
|
+
|
|
3
11
|
## 2.43.0
|
|
4
12
|
|
|
5
13
|
Dependency updates only.
|
|
@@ -275,8 +275,6 @@ export interface IFluidHandleEvents {
|
|
|
275
275
|
export interface IFluidHandleInternal<out T = unknown> extends IFluidHandle<T>, IProvideFluidHandle {
|
|
276
276
|
readonly absolutePath: string;
|
|
277
277
|
attachGraph(): void;
|
|
278
|
-
// @deprecated
|
|
279
|
-
bind(handle: IFluidHandleInternal): void;
|
|
280
278
|
}
|
|
281
279
|
|
|
282
280
|
// @alpha @legacy
|
package/dist/handles.d.ts
CHANGED
|
@@ -78,13 +78,6 @@ export interface IFluidHandleInternal<out T = unknown> extends IFluidHandle<T>,
|
|
|
78
78
|
* Runs through the graph and attach the bounded handles.
|
|
79
79
|
*/
|
|
80
80
|
attachGraph(): void;
|
|
81
|
-
/**
|
|
82
|
-
* Binds the given handle to this one or attach the given handle if this handle is attached.
|
|
83
|
-
* A bound handle will also be attached once this handle is attached.
|
|
84
|
-
*
|
|
85
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
86
|
-
*/
|
|
87
|
-
bind(handle: IFluidHandleInternal): void;
|
|
88
81
|
}
|
|
89
82
|
/**
|
|
90
83
|
* @privateRemarks
|
package/dist/handles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CAClD;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACtE;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB,aAAa,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACrD;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iBAAiB,CA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UAAU,CAAC,kBAAkB,GAAG,uBAAuB,CAAC,CAAC;CAC1E;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,MAEtC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;IAC5C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACpD;AAED;;;;;;GAMG;AAEH,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;CAAG"}
|
package/dist/handles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH;;;GAGG;AACU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC;AAwC3F;;;;;GAKG;AACU,QAAA,YAAY,GAAG,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH;;;GAGG;AACU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC;AAwC3F;;;;;GAKG;AACU,QAAA,YAAY,GAAG,cAAc,CAAC;AA8H3C;;;;;;;;;;;;;GAaG;AACU,QAAA,iBAAiB,GAAkB,MAAM,CAAC,GAAG,CACzD,kDAAkD,CAClD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"./erasedType.js\";\nimport type { IRequest, IResponse } from \"./fluidRouter.js\";\nimport type { Listenable } from \"./internal.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidHandleContext: keyof IProvideFluidHandleContext = \"IFluidHandleContext\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideFluidHandleContext {\n\treadonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Describes a routing context from which other `IFluidHandleContext`s are defined.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandleContext extends IProvideFluidHandleContext {\n\t/**\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined\n\t * at the root.\n\t */\n\treadonly routeContext?: IFluidHandleContext;\n\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n\n\tresolveHandle(request: IRequest): Promise<IResponse>;\n}\n\n/**\n * @public\n * @privateRemarks\n * This really should be deprecated and alpha, but since its a merged export with the public interface,\n * it can't have its own docs or different tags.\n */\nexport const IFluidHandle = \"IFluidHandle\";\n\n/**\n * @deprecated {@link IFluidHandleInternal} and {@link IFluidHandleInternal} should be identified should be identified using the {@link fluidHandleSymbol} symbol.\n * @legacy\n * @alpha\n */\nexport interface IProvideFluidHandle {\n\t/**\n\t * @deprecated {@link IFluidHandleInternal} and {@link IFluidHandleInternal} should be identified should be identified using the {@link fluidHandleSymbol} symbol.\n\t * @privateRemarks\n\t * This field must be kept so that code from before 2.0.0-rc.4.0.0 (When fluidHandleSymbol was added) still detects handles.\n\t * This is required due to some use-cases mixing package versions.\n\t * More details in packages/runtime/runtime-utils/src/handles.ts and on {@link fluidHandleSymbol}.\n\t */\n\treadonly [IFluidHandle]: IFluidHandleInternal;\n}\n\n/**\n * Handle to a shared {@link FluidObject}.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandleInternal<\n\t// REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n\tout T = unknown, // FluidObject & IFluidLoadable,\n> extends IFluidHandle<T>,\n\t\tIProvideFluidHandle {\n\t/**\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n}\n\n/**\n * @privateRemarks\n * To be merged onto IFluidHandleInternal in accordance with breaking change policy\n * @internal\n */\nexport interface IFluidHandleInternalPayloadPending<\n\t// REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n\tout T = unknown, // FluidObject & IFluidLoadable,\n> extends IFluidHandleInternal<T> {\n\t/**\n\t * Whether the handle has a pending payload, meaning that it may exist before its payload is retrievable.\n\t * For instance, the BlobManager can generate handles before completing the blob upload/attach.\n\t */\n\treadonly payloadPending: boolean;\n}\n\n/**\n * The state of the handle's payload.\n * - \"pending\" - The payload is not shared to all collaborators\n * - \"shared\" - The payload is available to both the local client and remote collaborators\n *\n * @remarks\n * Clients will see a transition of \"pending\" to \"shared\" when the payload has been shared to all collaborators.\n * @legacy\n * @alpha\n */\nexport type PayloadState = \"pending\" | \"shared\";\n\n/**\n * Events which fire from an IFluidHandle.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandleEvents {\n\t/**\n\t * Emitted when the payload becomes available to remote collaborators.\n\t */\n\tpayloadShared: () => void;\n}\n\n/**\n * Observable state on the handle regarding its payload sharing state.\n *\n * @privateRemarks\n * Contents to be merged to IFluidHandle, and then this separate interface should be removed.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandlePayloadPending<T> extends IFluidHandle<T> {\n\t/**\n\t * The current state of the handle's payload.\n\t */\n\treadonly payloadState: PayloadState;\n\t/**\n\t * Event emitter, with events that emit as the payload state transitions.\n\t */\n\treadonly events: Listenable<IFluidHandleEvents>;\n}\n\n/**\n * Additional events which fire as a local handle's payload state transitions.\n * @legacy\n * @alpha\n */\nexport interface ILocalFluidHandleEvents extends IFluidHandleEvents {\n\t/**\n\t * Emitted for locally created handles when the payload fails sharing to remote collaborators.\n\t */\n\tpayloadShareFailed: (error: unknown) => void;\n}\n\n/**\n * Additional observable state on a local handle regarding its payload sharing state.\n * @legacy\n * @alpha\n */\nexport interface ILocalFluidHandle<T> extends IFluidHandlePayloadPending<T> {\n\t/**\n\t * The error encountered by the handle while sharing the payload, if one has occurred. Undefined if no error has occurred.\n\t */\n\treadonly payloadShareError: unknown;\n\t/**\n\t * Event emitter, with events that emit as the payload state transitions.\n\t */\n\treadonly events: Listenable<IFluidHandleEvents & ILocalFluidHandleEvents>;\n}\n\n/**\n * Symbol which must only be used on an {@link (IFluidHandle:interface)}, and is used to identify such objects.\n *\n * @remarks\n * To narrow arbitrary objects to handles do not simply check for this symbol:\n * instead use {@link @fluidframework/runtime-utils#isFluidHandle} which has improved compatibility\n * with older implementations of handles that may exist due to dynamic code loading of older packages.\n *\n * @privateRemarks\n * Normally `Symbol` would be used here instead of `Symbol.for` since just using Symbol (and avoiding the global symbol registry) removes the risk of collision, which is the main point of using a symbol for this in the first place.\n * In this case however, some users of this library do dynamic code loading, and can end up with multiple versions of packages, and mix data from one version with another.\n * Using the global symbol registry allows duplicate copies of this library to share a single symbol, though reintroduces the risk of collision, which is mitigated via the use of a UUIDv4 randomly generated when this code was authored:\n * @public\n */\nexport const fluidHandleSymbol: unique symbol = Symbol.for(\n\t\"FluidHandle-3978c7cf-4675-49ba-a20c-bf35efbf43da\",\n);\n\n/**\n * Handle to a shared {@link FluidObject}.\n * @sealed @public\n */\nexport interface IFluidHandle<out T = unknown> {\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Returns a promise to the Fluid Object referenced by the handle.\n\t */\n\tget(): Promise<T>;\n\n\t/**\n\t * Symbol used to mark an object as a {@link (IFluidHandle:interface)}\n\t * and to recover the underlying handle implementation.\n\t *\n\t * @privateRemarks\n\t * Used to recover {@link IFluidHandleInternal}, see {@link toFluidHandleInternal}.\n\t */\n\treadonly [fluidHandleSymbol]: IFluidHandleErased<T>;\n}\n\n/**\n * A type erased Fluid Handle.\n * These can only be produced by the Fluid Framework and provide the implementation details needed to power {@link (IFluidHandle:interface)}.\n * @privateRemarks\n * Created from {@link IFluidHandleInternal} using {@link toFluidHandleErased}.\n * @sealed @public\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IFluidHandleErased<T> extends ErasedType<readonly [\"IFluidHandle\", T]> {}\n"]}
|
package/lib/handles.d.ts
CHANGED
|
@@ -78,13 +78,6 @@ export interface IFluidHandleInternal<out T = unknown> extends IFluidHandle<T>,
|
|
|
78
78
|
* Runs through the graph and attach the bounded handles.
|
|
79
79
|
*/
|
|
80
80
|
attachGraph(): void;
|
|
81
|
-
/**
|
|
82
|
-
* Binds the given handle to this one or attach the given handle if this handle is attached.
|
|
83
|
-
* A bound handle will also be attached once this handle is attached.
|
|
84
|
-
*
|
|
85
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
86
|
-
*/
|
|
87
|
-
bind(handle: IFluidHandleInternal): void;
|
|
88
81
|
}
|
|
89
82
|
/**
|
|
90
83
|
* @privateRemarks
|
package/lib/handles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CAClD;AAED;;;;GAIG;AACH,MAAM,WAAW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,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;CAChD;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IAClE;;OAEG;IACH,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,CAAE,SAAQ,0BAA0B,CAAC,CAAC,CAAC;IAC1E;;OAEG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,GAAG,uBAAuB,CAAC,CAAC;CAC1E;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,MAEtC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;IAC5C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACpD;AAED;;;;;;GAMG;AAEH,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;CAAG"}
|
package/lib/handles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,qBAAqB,CAAC;AAwC3F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAqC,qBAAqB,CAAC;AAwC3F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AA8H3C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAkB,MAAM,CAAC,GAAG,CACzD,kDAAkD,CAClD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"./erasedType.js\";\nimport type { IRequest, IResponse } from \"./fluidRouter.js\";\nimport type { Listenable } from \"./internal.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidHandleContext: keyof IProvideFluidHandleContext = \"IFluidHandleContext\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideFluidHandleContext {\n\treadonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Describes a routing context from which other `IFluidHandleContext`s are defined.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandleContext extends IProvideFluidHandleContext {\n\t/**\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined\n\t * at the root.\n\t */\n\treadonly routeContext?: IFluidHandleContext;\n\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n\n\tresolveHandle(request: IRequest): Promise<IResponse>;\n}\n\n/**\n * @public\n * @privateRemarks\n * This really should be deprecated and alpha, but since its a merged export with the public interface,\n * it can't have its own docs or different tags.\n */\nexport const IFluidHandle = \"IFluidHandle\";\n\n/**\n * @deprecated {@link IFluidHandleInternal} and {@link IFluidHandleInternal} should be identified should be identified using the {@link fluidHandleSymbol} symbol.\n * @legacy\n * @alpha\n */\nexport interface IProvideFluidHandle {\n\t/**\n\t * @deprecated {@link IFluidHandleInternal} and {@link IFluidHandleInternal} should be identified should be identified using the {@link fluidHandleSymbol} symbol.\n\t * @privateRemarks\n\t * This field must be kept so that code from before 2.0.0-rc.4.0.0 (When fluidHandleSymbol was added) still detects handles.\n\t * This is required due to some use-cases mixing package versions.\n\t * More details in packages/runtime/runtime-utils/src/handles.ts and on {@link fluidHandleSymbol}.\n\t */\n\treadonly [IFluidHandle]: IFluidHandleInternal;\n}\n\n/**\n * Handle to a shared {@link FluidObject}.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandleInternal<\n\t// REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n\tout T = unknown, // FluidObject & IFluidLoadable,\n> extends IFluidHandle<T>,\n\t\tIProvideFluidHandle {\n\t/**\n\t * The absolute path to the handle context from the root.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Runs through the graph and attach the bounded handles.\n\t */\n\tattachGraph(): void;\n}\n\n/**\n * @privateRemarks\n * To be merged onto IFluidHandleInternal in accordance with breaking change policy\n * @internal\n */\nexport interface IFluidHandleInternalPayloadPending<\n\t// REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n\tout T = unknown, // FluidObject & IFluidLoadable,\n> extends IFluidHandleInternal<T> {\n\t/**\n\t * Whether the handle has a pending payload, meaning that it may exist before its payload is retrievable.\n\t * For instance, the BlobManager can generate handles before completing the blob upload/attach.\n\t */\n\treadonly payloadPending: boolean;\n}\n\n/**\n * The state of the handle's payload.\n * - \"pending\" - The payload is not shared to all collaborators\n * - \"shared\" - The payload is available to both the local client and remote collaborators\n *\n * @remarks\n * Clients will see a transition of \"pending\" to \"shared\" when the payload has been shared to all collaborators.\n * @legacy\n * @alpha\n */\nexport type PayloadState = \"pending\" | \"shared\";\n\n/**\n * Events which fire from an IFluidHandle.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandleEvents {\n\t/**\n\t * Emitted when the payload becomes available to remote collaborators.\n\t */\n\tpayloadShared: () => void;\n}\n\n/**\n * Observable state on the handle regarding its payload sharing state.\n *\n * @privateRemarks\n * Contents to be merged to IFluidHandle, and then this separate interface should be removed.\n * @legacy\n * @alpha\n */\nexport interface IFluidHandlePayloadPending<T> extends IFluidHandle<T> {\n\t/**\n\t * The current state of the handle's payload.\n\t */\n\treadonly payloadState: PayloadState;\n\t/**\n\t * Event emitter, with events that emit as the payload state transitions.\n\t */\n\treadonly events: Listenable<IFluidHandleEvents>;\n}\n\n/**\n * Additional events which fire as a local handle's payload state transitions.\n * @legacy\n * @alpha\n */\nexport interface ILocalFluidHandleEvents extends IFluidHandleEvents {\n\t/**\n\t * Emitted for locally created handles when the payload fails sharing to remote collaborators.\n\t */\n\tpayloadShareFailed: (error: unknown) => void;\n}\n\n/**\n * Additional observable state on a local handle regarding its payload sharing state.\n * @legacy\n * @alpha\n */\nexport interface ILocalFluidHandle<T> extends IFluidHandlePayloadPending<T> {\n\t/**\n\t * The error encountered by the handle while sharing the payload, if one has occurred. Undefined if no error has occurred.\n\t */\n\treadonly payloadShareError: unknown;\n\t/**\n\t * Event emitter, with events that emit as the payload state transitions.\n\t */\n\treadonly events: Listenable<IFluidHandleEvents & ILocalFluidHandleEvents>;\n}\n\n/**\n * Symbol which must only be used on an {@link (IFluidHandle:interface)}, and is used to identify such objects.\n *\n * @remarks\n * To narrow arbitrary objects to handles do not simply check for this symbol:\n * instead use {@link @fluidframework/runtime-utils#isFluidHandle} which has improved compatibility\n * with older implementations of handles that may exist due to dynamic code loading of older packages.\n *\n * @privateRemarks\n * Normally `Symbol` would be used here instead of `Symbol.for` since just using Symbol (and avoiding the global symbol registry) removes the risk of collision, which is the main point of using a symbol for this in the first place.\n * In this case however, some users of this library do dynamic code loading, and can end up with multiple versions of packages, and mix data from one version with another.\n * Using the global symbol registry allows duplicate copies of this library to share a single symbol, though reintroduces the risk of collision, which is mitigated via the use of a UUIDv4 randomly generated when this code was authored:\n * @public\n */\nexport const fluidHandleSymbol: unique symbol = Symbol.for(\n\t\"FluidHandle-3978c7cf-4675-49ba-a20c-bf35efbf43da\",\n);\n\n/**\n * Handle to a shared {@link FluidObject}.\n * @sealed @public\n */\nexport interface IFluidHandle<out T = unknown> {\n\t/**\n\t * Flag indicating whether or not the entity has services attached.\n\t */\n\treadonly isAttached: boolean;\n\n\t/**\n\t * Returns a promise to the Fluid Object referenced by the handle.\n\t */\n\tget(): Promise<T>;\n\n\t/**\n\t * Symbol used to mark an object as a {@link (IFluidHandle:interface)}\n\t * and to recover the underlying handle implementation.\n\t *\n\t * @privateRemarks\n\t * Used to recover {@link IFluidHandleInternal}, see {@link toFluidHandleInternal}.\n\t */\n\treadonly [fluidHandleSymbol]: IFluidHandleErased<T>;\n}\n\n/**\n * A type erased Fluid Handle.\n * These can only be produced by the Fluid Framework and provide the implementation details needed to power {@link (IFluidHandle:interface)}.\n * @privateRemarks\n * Created from {@link IFluidHandleInternal} using {@link toFluidHandleErased}.\n * @sealed @public\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IFluidHandleErased<T> extends ErasedType<readonly [\"IFluidHandle\", T]> {}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/core-interfaces",
|
|
3
|
-
"version": "2.50.0
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"description": "Fluid object interfaces",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -99,7 +99,14 @@
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
"typeValidation": {
|
|
102
|
-
"broken": {
|
|
102
|
+
"broken": {
|
|
103
|
+
"Interface_IProvideFluidHandle": {
|
|
104
|
+
"backCompat": false
|
|
105
|
+
},
|
|
106
|
+
"Interface_IFluidHandleInternal": {
|
|
107
|
+
"backCompat": false
|
|
108
|
+
}
|
|
109
|
+
},
|
|
103
110
|
"entrypoint": "legacy"
|
|
104
111
|
},
|
|
105
112
|
"scripts": {
|
package/src/handles.ts
CHANGED
|
@@ -94,14 +94,6 @@ export interface IFluidHandleInternal<
|
|
|
94
94
|
* Runs through the graph and attach the bounded handles.
|
|
95
95
|
*/
|
|
96
96
|
attachGraph(): void;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Binds the given handle to this one or attach the given handle if this handle is attached.
|
|
100
|
-
* A bound handle will also be attached once this handle is attached.
|
|
101
|
-
*
|
|
102
|
-
* @deprecated No replacement provided. Arbitrary handles may not serve as a bind source.
|
|
103
|
-
*/
|
|
104
|
-
bind(handle: IFluidHandleInternal): void;
|
|
105
97
|
}
|
|
106
98
|
|
|
107
99
|
/**
|