Commit b9e079c
fix: update items input type to readonly in NgSelectComponent (ng-select#2704)
* feat: add Angular project cursor rules and guidelines for best practices
- Introduced a comprehensive set of rules for Angular projects, covering topics such as using the latest Angular and TypeScript versions, modern features, component architecture, type safety, dependency injection, API communication, state management, testing, accessibility, and documentation.
- Emphasized the use of Angular signals, standalone components, and strict typing to enhance code quality and maintainability.
- Included guidelines for code generation to ensure consistency and adherence to best practices.
* fix: clean up imports and improve code formatting in NgSelectComponent
- Removed duplicate imports for contentChild, contentChildren, and computed.
- Adjusted formatting for better readability in several areas, including promise handling and observable subscriptions.
- Ensured consistent use of arrow function syntax and spacing throughout the component.
* fix: converts items as input signal
- Adjusted HTML formatting for better readability in the data source array example.
- Cleaned up import statements in the data source array example component.
- Updated test expectations in NgSelectComponent tests to reflect changes in item handling.
* fix: refactor items input handling in NgSelectComponent
* fix: update items input type to readonly in NgSelectComponent
- Changed the items input type from mutable to readonly to enhance type safety and prevent unintended modifications.
- Updated the private method _setItems to reflect the new readonly type for items.
---------
Co-authored-by: Pavan Kumar Jadda <17564080+pavankjadda@users.noreply.github.com>1 parent e54234a commit b9e079c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| |||
0 commit comments