MemberResolver
A callback that performs access-control filtering during member resolution.
Members
Section titled “Members”| Call signature | (owner: TSymbol, member: TSymbol, context: MemberResolutionContext<TScope>) => void |
Remarks
Section titled “Remarks”When provided to ResolveDeclarationByKeyOptions, it entirely replaces
the default checks (ownership assertion and isMemberSymbol assertion).
Contract:
- Return
voidto accept the member. - Throw an error to reject the member — the error propagates to the caller, matching the behavior of the default checks.
Example
Section titled “Example”const resolver: MemberResolver<MyScope, MySymbol> = (owner, member, ctx) => {
if (member.isPrivate && !ctx.isMemberAccess) {
throw new Error(`${member.name} is not accessible here`);
}
};
See also
Section titled “See also”- MemberResolutionContext for available context properties.