Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoComplete documentation example uses wrong type #17096

Open
Wendelstein7 opened this issue Dec 17, 2024 · 1 comment
Open

AutoComplete documentation example uses wrong type #17096

Wendelstein7 opened this issue Dec 17, 2024 · 1 comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@Wendelstein7
Copy link
Contributor

Wendelstein7 commented Dec 17, 2024

Describe the bug

The documentation of AutoComplete contains this code in the example:

items: any[] | undefined;

However the signature of the suggestions-property is any[]. This causes the following error in a TypeScript IDE:

Type 'any[] | undefined' is not assignable to type 'any[]'.
  Type 'undefined' is not assignable to type 'any[]'.ngtsc(2322)

Therefore, the example code should be corrected to:

items: any[] = [];

I have a PR fixing this issue: #17097

Environment

Angular 19 with PrimeNG 19

Reproducer

No response

Angular version

19.0.0

PrimeNG version

19.0.0-rc.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

22.6.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@Wendelstein7 Wendelstein7 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 17, 2024
@mertsincan
Copy link
Member

Sorry for the confusion. Can you resend the PR of the Master branch? Thank you!

@mertsincan mertsincan added this to the 19.0.2 milestone Dec 19, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 19, 2024
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

No branches or pull requests

2 participants