import { IGroup , IUser } from "@esri/arcgis-rest-types" ; param { IGroup } group param { IUser } user returns { boolean } export function canEditTeam ( group , user ) { const memberType = group . userMembership ?. memberType ; const userName = group . userMembership ?. username ; return ( userName === user . username && ( memberType === "owner" || memberType === "admin" ) ) ; }