Skip to content

Commit

Permalink
Remove name from ContainerSchema (#7285)
Browse files Browse the repository at this point in the history
* remove name from ContainerSchema
  • Loading branch information
skylerjokiel authored Aug 30, 2021
1 parent af524c8 commit 26420a2
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 23 deletions.
1 change: 0 additions & 1 deletion api-report/fluid-static.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { TypedEventEmitter } from '@fluidframework/common-utils';
export interface ContainerSchema {
dynamicObjectTypes?: LoadableObjectClass<any>[];
initialObjects: LoadableObjectClassRecord;
name: string;
}

// @public
Expand Down
1 change: 0 additions & 1 deletion examples/data-objects/focus-tracker/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { FocusTracker } from "./FocusTracker";
// This includes the DataObjects we support and any initial DataObjects we want created
// when the container is first created.
const containerSchema: ContainerSchema = {
name: "focus-tracker-container",
initialObjects: {
/* [id]: DataObject */
signalManager: SignalManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const connectionConfig: AzureConnectionConfig = useAzure ? {
// This includes the DataObjects we support and any initial DataObjects we want created
// when the container is first created.
const containerSchema = {
name: "dice-roller-container",
initialObjects: {
/* [id]: DataObject */
map1: SharedMap,
Expand Down
3 changes: 0 additions & 3 deletions packages/framework/azure-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ See [`ContainerSchema`](./src/types.ts) in [`./src/types/ts`](./src/types.ts) fo

```typescript
const schema = {
name: "my-container",
initialObjects: {
/* ... */
},
Expand Down Expand Up @@ -110,7 +109,6 @@ The most common way to use Fluid is through initial collaborative objects that a
// Define the keys and types of the initial list of collaborative objects.
// Here, we are using a SharedMap DDS on key "map1" and a SharedString on key "text1".
const schema = {
name: "my-container",
initialObjects: {
map1: SharedMap,
text1: SharedString,
Expand All @@ -137,7 +135,6 @@ Dynamic objects are loaded on-demand to optimize for data virtualization. To get

```typescript
const schema = {
name: "my-container",
initialObjects: {
map1: SharedMap,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { createAzureClient } from "./AzureClientFactory";
describe("AzureClient", () => {
const client = createAzureClient();
const schema: ContainerSchema = {
name: "azure-client-test",
initialObjects: {
map1: SharedMap,
},
Expand Down
12 changes: 2 additions & 10 deletions packages/framework/fluid-static/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export type LoadableObjectClass<T extends IFluidLoadable> = DataObjectClass<T> |

/**
* A DataObjectClass is a class that has a factory that can create a DataObject and a
* contructor that will return the type of the DataObject.
* constructor that will return the type of the DataObject.
*/
export type DataObjectClass<T extends IFluidLoadable>
= { readonly factory: IFluidDataStoreFactory } & LoadableObjectCtor<T>;

/**
* A SharedObjectClass is a class that has a factory that can create a DDS (SharedObject) and a
* contructor that will return the type of the DataObject.
* constructor that will return the type of the DataObject.
*/
export type SharedObjectClass<T extends IFluidLoadable>
= { readonly getFactory: () => IChannelFactory } & LoadableObjectCtor<T>;
Expand All @@ -37,14 +37,6 @@ export type SharedObjectClass<T extends IFluidLoadable>
export type LoadableObjectCtor<T extends IFluidLoadable> = new(...args: any[]) => T;

export interface ContainerSchema {
/**
* Name of the container being defined.
*
* This property is not currently used by Fluid but instead provides the developer a centralized
* location to name their container. It is useful in multi-container scenarios.
*/
name: string;

/**
* initialObjects defines loadable objects that will be created when the Container
* is first created. It uses the key as the id and the value as the loadable object to create.
Expand Down
3 changes: 0 additions & 3 deletions packages/framework/tinylicious-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ See [`ContainerSchema`](./src/types.ts) in [`./src/types/ts`](./src/types.ts) fo

```javascript
const schema = {
name: "my-container",
initialObjects: {
/* ... */
},
Expand Down Expand Up @@ -71,7 +70,6 @@ The most common way to use Fluid is through initial collaborative objects that a

```javascript
const schema = {
name: "my-container",
initialObjects: {
map1: SharedMap,
text1: SharedString,
Expand All @@ -95,7 +93,6 @@ Dynamic objects are loaded on-demand to optimize for data virtualization. To get

```javascript
const schema = {
name: "my-container",
initialObjects: {
map1: SharedMap,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
describe("TinyliciousClient", () => {
let tinyliciousClient: TinyliciousClient;
const schema: ContainerSchema = {
name: "tinylicious-client-test",
initialObjects: {
map1: SharedMap,
},
Expand Down Expand Up @@ -184,7 +183,6 @@ describe("TinyliciousClient", () => {
*/
it("can create/add loadable objects (DDS) dynamically during runtime", async () => {
const dynamicSchema: ContainerSchema = {
name: "dynamic-schema-test",
initialObjects: {
map1: SharedMap,
},
Expand Down Expand Up @@ -215,7 +213,6 @@ describe("TinyliciousClient", () => {
*/
it("can create/add loadable objects (custom data object) dynamically during runtime", async () => {
const dynamicSchema: ContainerSchema = {
name: "dynamic-schema-test",
initialObjects: {
map1: SharedMap,
},
Expand Down

0 comments on commit 26420a2

Please sign in to comment.