20 lines
939 B
Markdown
20 lines
939 B
Markdown
---
|
||
name: angular-access-modifiers
|
||
description: Apply explicit TypeScript access modifiers to Angular component, directive, and pipe members. Use when editing or reviewing Angular class APIs in a repository that adopts this convention.
|
||
---
|
||
|
||
# angular-access-modifiers
|
||
|
||
## Workflow
|
||
1. Inspect the component’s template and callers before changing visibility.
|
||
2. Use `protected` for template-facing members when the project supports it, `private` for implementation details, and `public` for intentional external APIs and lifecycle hooks.
|
||
3. Keep existing framework-required visibility when a compiler or decorator requires it.
|
||
4. Run the project typecheck and relevant template tests.
|
||
|
||
## Rules
|
||
- Do not change visibility only to satisfy a test; fix the test boundary or document the API.
|
||
- Prefer the repository’s established Angular convention if it differs.
|
||
|
||
## Output
|
||
List changed members, their consumers, and verification results.
|