@launchdarkly/js-server-sdk-common - v2.27.0
    Preparing search index...

    Interface TestDataSourceConfiguration

    Uses a TestData instance as a data source of the data system. The source does not use the network.

    As an initializer, the source sends the current test data one time. As a synchronizer, the source sends the current test data. Then it sends each change that you make with TestData.update, TestData.usePreconfiguredFlag, or TestData.usePreconfiguredSegment.

    Use the entry as a synchronizer. If you use it only as an initializer, the client initializes from the test data that is present at start. Then the client reports an error because it has no more data sources. The client does not get the changes that you make after that.

    You can use one TestData instance in more than one entry and with more than one client. A change goes to all of the clients that use the instance.

    const td = new TestData();
    td.update(td.flag('flag-key').booleanFlag().variationForAll(true));

    const client = init(sdkKey, {
    dataSystem: {
    dataSource: {
    dataSourceOptionsType: 'custom',
    initializers: [],
    synchronizers: [{ type: 'testData', testData: td }],
    },
    },
    });
    interface TestDataSourceConfiguration {
        testData: TestData;
        type: "testData";
    }
    Index
    testData: TestData

    The test data that the source sends to the SDK.

    type: "testData"