Skip to content

Commit

Permalink
removed FluidDataStoreContext.createdProps (#2951)
Browse files Browse the repository at this point in the history
It is not used directly in Fluid Preview, and back compat is covered by earlier note of removal of _createDataStoreWithProps
  • Loading branch information
vladsud authored Jul 31, 2020
1 parent 42ad86e commit bc70864
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export abstract class PureDataObject<P extends IFluidObject = object, S = undefi
public async initialize(initialState?: S): Promise<void> {
// 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;
Expand Down
4 changes: 0 additions & 4 deletions packages/runtime/container-runtime/src/componentContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/container-runtime/src/containerRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<FluidDataStoreContext>();
this.contextsDeferred.set(id, deferred);
Expand All @@ -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<FluidDataStoreContext>();
this.contextsDeferred.set(id, deferred);
Expand Down
5 changes: 0 additions & 5 deletions packages/runtime/runtime-definitions/src/componentContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,6 @@ export interface IFluidDataStoreContext extends EventEmitter {
readonly hostRuntime: IContainerRuntimeBase;
readonly snapshotFn: (message: string) => Promise<void>;

/**
* @deprecated 0.16 Issue #1635 Use the IFluidDataStoreFactory creation methods instead to specify initial state
*/
readonly createProps?: any;

/**
* Ambient services provided with the context
*/
Expand Down

0 comments on commit bc70864

Please sign in to comment.