MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / isAuthOrAuthMemberAccess

Function isAuthOrAuthMemberAccess

packages/language/src/utils.ts:135–137  ·  view source on GitHub ↗
(expr: Expression)

Source from the content-addressed store, hash-verified

133 * Determines if the given expression is an invocation of `auth` or a member access on the result of an `auth` invocation (e.g. `auth().role`).
134 */
135export function isAuthOrAuthMemberAccess(expr: Expression): boolean {
136 return isAuthInvocation(expr) || (isMemberAccessExpr(expr) && isAuthOrAuthMemberAccess(expr.operand));
137}
138
139/**
140 * Determines if the given expression is a reference to an enum field.

Calls 2

isMemberAccessExprFunction · 0.90
isAuthInvocationFunction · 0.85

Tested by

no test coverage detected