Merge pull request #10815 from djamaile/chore/update-document-text

chore: update the return type guard for `isGroupEntity`
This commit is contained in:
Fredrik Adelöw
2022-05-05 15:36:35 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -14,13 +14,13 @@
* limitations under the License.
*/
import { Entity, UserEntity } from '@backstage/catalog-model';
import { Entity, UserEntity, GroupEntity } from '@backstage/catalog-model';
function isUserEntity(entity: Entity): entity is UserEntity {
return entity.kind.toLocaleUpperCase('en-US') === 'USER';
}
function isGroupEntity(entity: Entity): entity is UserEntity {
function isGroupEntity(entity: Entity): entity is GroupEntity {
return entity.kind.toLocaleUpperCase('en-US') === 'GROUP';
}