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

Fix 17096: Updated examples to remove 'undefined' from suggestions type. #17097

Closed
wants to merge 1 commit into from

Conversation

Wendelstein7
Copy link
Contributor

Fix #17096: Since the 'suggestions' variable from the Autosuggest component has type any[], the example code should reflect this.

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[] = [];

Since the 'suggestions' variable from the Autosuggest component has type `any[]`, the example code should reflect this.
Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Dec 17, 2024 2:56pm

Copy link

vercel bot commented Dec 17, 2024

@Wendelstein7 is attempting to deploy a commit to the primetek Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants