From bc70864816177251929b5297281dc0cd2a1c4ec0 Mon Sep 17 00:00:00 2001 From: Vlad Sudzilouski Date: Fri, 31 Jul 2020 14:57:20 -0700 Subject: [PATCH] removed FluidDataStoreContext.createdProps (#2951) It is not used directly in Fluid Preview, and back compat is covered by earlier note of removal of _createDataStoreWithProps --- .../framework/aqueduct/src/components/sharedComponent.ts | 2 +- packages/runtime/container-runtime/src/componentContext.ts | 4 ---- packages/runtime/container-runtime/src/containerRuntime.ts | 4 ++-- packages/runtime/runtime-definitions/src/componentContext.ts | 5 ----- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/framework/aqueduct/src/components/sharedComponent.ts b/packages/framework/aqueduct/src/components/sharedComponent.ts index 0f390e301174..9e3a353d8675 100644 --- a/packages/framework/aqueduct/src/components/sharedComponent.ts +++ b/packages/framework/aqueduct/src/components/sharedComponent.ts @@ -100,7 +100,7 @@ export abstract class PureDataObject

{ // We want to ensure if this gets called more than once it only executes the initialize code once. if (!this.initializeP) { - this.initializeP = this.initializeInternal(this.context.createProps as S ?? initialState); + this.initializeP = this.initializeInternal(initialState); } await this.initializeP; diff --git a/packages/runtime/container-runtime/src/componentContext.ts b/packages/runtime/container-runtime/src/componentContext.ts index d648de67bb85..34176b2fb2c0 100644 --- a/packages/runtime/container-runtime/src/componentContext.ts +++ b/packages/runtime/container-runtime/src/componentContext.ts @@ -620,10 +620,6 @@ export class LocalFluidDataStoreContext extends FluidDataStoreContext { scope: IFluidObject & IFluidObject, summaryTracker: SummaryTracker, bindComponent: (componentRuntime: IFluidDataStoreChannel) => void, - /** - * @deprecated 0.16 Issue #1635 Use the IFluidDataStoreFactory creation methods instead to specify initial state - */ - public readonly createProps?: any, ) { super(runtime, id, false, storage, scope, summaryTracker, BindState.NotBound, bindComponent, pkg); this.attachListeners(); diff --git a/packages/runtime/container-runtime/src/containerRuntime.ts b/packages/runtime/container-runtime/src/containerRuntime.ts index bd251dc974e5..c0dfe1c9a362 100644 --- a/packages/runtime/container-runtime/src/containerRuntime.ts +++ b/packages/runtime/container-runtime/src/containerRuntime.ts @@ -1165,7 +1165,7 @@ export class ContainerRuntime extends EventEmitter this.containerScope, this.summaryTracker.createOrGetChild(id, this.deltaManager.lastSequenceNumber), (cr: IFluidDataStoreChannel) => this.bindComponent(cr), - undefined); + ); const deferred = new Deferred(); this.contextsDeferred.set(id, deferred); @@ -1191,7 +1191,7 @@ export class ContainerRuntime extends EventEmitter this.containerScope, this.summaryTracker.createOrGetChild(id, this.deltaManager.lastSequenceNumber), (cr: IFluidDataStoreChannel) => this.bindComponent(cr), - undefined /* #1635: Remove LocalFluidDataStoreContext createProps */); + ); const deferred = new Deferred(); this.contextsDeferred.set(id, deferred); diff --git a/packages/runtime/runtime-definitions/src/componentContext.ts b/packages/runtime/runtime-definitions/src/componentContext.ts index c16b3a0af64c..f9bbb7234dd8 100644 --- a/packages/runtime/runtime-definitions/src/componentContext.ts +++ b/packages/runtime/runtime-definitions/src/componentContext.ts @@ -258,11 +258,6 @@ export interface IFluidDataStoreContext extends EventEmitter { readonly hostRuntime: IContainerRuntimeBase; readonly snapshotFn: (message: string) => Promise; - /** - * @deprecated 0.16 Issue #1635 Use the IFluidDataStoreFactory creation methods instead to specify initial state - */ - readonly createProps?: any; - /** * Ambient services provided with the context */