isResourcePermission()
Home > @backstage/plugin-permission-common
> isResourcePermission
Check if a given permission is a ResourcePermission. When resourceType
is supplied as the second parameter, also checks if the permission has the specified resource type.
Signature:
function isResourcePermission<T extends string = string>(permission: Permission, resourceType?: T): permission is ResourcePermission<T>;
Parameters
Parameter |
Type |
Description |
---|---|---|
permission | ||
resourceType |
T |
(Optional) |
permission is ResourcePermission<T>