/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { FluidObject, IFluidLoadable } from "@fluidframework/core-interfaces"; import { SharedObjectKind } from "fluid-framework"; /** * Hook to gets or creates a DDS that corresponds to a given uniqueKey string. * * @remarks * This hook can only be used in a child component of `` or ``. * * @template T Type of Fluid SharedObjectKind type to load. Must conform to IFluidLoadable interface. * @param uniqueKey uniqueKey value for the data object * @param objectKind Fluid SharedObjectKind to create/load. * @param onFirstInitialize Optional. Callback function for when the DDS is first loaded * @returns the DDS object, which is of type T when loaded and undefined while loading */ export declare function useDynamicDDS & IFluidLoadable>(uniqueKey: string, objectClass: SharedObjectKind, onFirstInitialize?: (dds: T) => void): { dds: T | undefined; error: Error | undefined; }; //# sourceMappingURL=useDynamicDDS.d.ts.map