import { IsetGroupOwner } from "../../../@types/helper/methods" ; declare var SP ; /**
 * Sets the group owner
 * This uses JSOM to set a site group owner's property to another group. You can only set the owner to a user, using the REST API.
 */ export const setGroupOwner = ( groupName , ownerName ) : PromiseLike < void > => { return new Promise ( ( resolve , reject ) => { let context = new SP . ClientContext ( ) ; let siteGroups = context . get_web ( ) . get_siteGroups ( ) ; let group = siteGroups . getByName ( groupName ) ; let owner = siteGroups . getByName ( ownerName ) ; group . set_owner ( owner ) ; group . update ( ) ; context . executeQueryAsync ( resolve , reject ) ; } ) ; } ;