Skip to main content
Version: Next

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

Permission

resourceType

T

(Optional)

**Returns:**

permission is ResourcePermission<T>