feat: Add internal container accessor to `IFluidContainer` (#13222)
Adds an internal-only method to `IFluidContainer` for accessing its backing `IContainer`. Needed to light up Client Debugger initialization from the 3rd party API surface without requiring creepy / brittle type-casts.
This commit is contained in:
Родитель
7cb44f5b75
Коммит
d6447ffdd1
|
@ -50,6 +50,8 @@ export class FluidContainer extends TypedEventEmitter<IFluidContainerEvents> imp
|
|||
dispose(): void;
|
||||
get disposed(): boolean;
|
||||
get initialObjects(): LoadableObjectRecord;
|
||||
// @internal
|
||||
readonly INTERNAL_CONTAINER_DO_NOT_USE?: () => IContainer;
|
||||
get isDirty(): boolean;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,8 @@ export interface IFluidContainerEvents extends IEvent {
|
|||
/**
|
||||
* Provides an entrypoint into the client side of collaborative Fluid data.
|
||||
* Provides access to the data as well as status on the collaboration session.
|
||||
*
|
||||
* @remarks Note: external implementations of this interface are not supported.
|
||||
*/
|
||||
export interface IFluidContainer extends IEventProvider<IFluidContainerEvents> {
|
||||
/**
|
||||
|
@ -303,4 +305,18 @@ export class FluidContainer extends TypedEventEmitter<IFluidContainerEvents> imp
|
|||
this.container.off("saved", this.savedHandler);
|
||||
this.container.off("dirty", this.dirtyHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* FOR INTERNAL USE ONLY. NOT FOR EXTERNAL USE.
|
||||
* We make no stability guarantees here whatsoever.
|
||||
*
|
||||
* Gets the underlying {@link @fluidframework/container-definitions#IContainer}.
|
||||
*
|
||||
* @remarks Used to power debug tooling.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public readonly INTERNAL_CONTAINER_DO_NOT_USE?: () => IContainer = () => {
|
||||
return this.container;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче