/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { LiveState, UserMeetingRole } from "@microsoft/live-share"; import { SetLiveStateAction } from "../types"; /** * React hook for using a Live Share `LiveState`. * * @remarks * Use this hook if you want to synchronize app state that will reset when all users leave the session. * This hook can only be used in a child component of `` or ``. * * @param uniqueKey the unique key for the `LiveEvent`. If one does not yet exist, a new one will be created, otherwise it will use the existing one. * @param initialState Optional. the initial state value of type TState * @param allowedRoles Optional. the user roles that are allowed to mutate the synchronized state * @returns ordered values: first value is the synchronized state value and the second is a setter to change the state value. * The setter returns a void promise, which will throw if the user does not have the required roles to set. */ export declare function useLiveState(uniqueKey: string, initialState: TState, allowedRoles?: UserMeetingRole[]): [TState, SetLiveStateAction, LiveState | undefined]; //# sourceMappingURL=useLiveState.d.ts.map