Skip to content

Conversation

@jason-ha
Copy link

@jason-ha jason-ha commented May 17, 2025

Details

PR type:

  • Bug fix
  • New feature / enhancement
  • Documentation
  • Samples or Test coverage

Change details

Support precisely typed IFluidContainers when given schema more specific than ContainerSchema.

code snippets:

Before:

    const schema: ContainerSchema = {
        initialObjects: {
            [testLiveEventKey]: LiveEvent,
        },
    };
    let results1: {
        container: IFluidContainer;
        services: AzureContainerServices;
    };
...
    results1 = await client1.createContainer(schema);

After:

    const schema = {
        initialObjects: {
            [testLiveEventKey]: LiveEvent,
        },
    } as const satisfies ContainerSchema;
    let results1: {
        container: IFluidContainer<typeof schema>;
        services: AzureContainerServices;
    };
...
    results1 = await client1.createContainer(schema);

screenshots:
Before:
image
After:
image

@jason-ha jason-ha marked this pull request as ready for review August 4, 2025 07:45
Copy link
Contributor

@ryanbliss ryanbliss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@huntj88 huntj88 merged commit 3b03a0b into microsoft:mainv2 Aug 14, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants