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

Wrong type definition of ToastCloseEvent #13079

Closed
Menecats opened this issue May 23, 2023 · 1 comment · Fixed by #13080
Closed

Wrong type definition of ToastCloseEvent #13079

Menecats opened this issue May 23, 2023 · 1 comment · Fixed by #13080
Assignees
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@Menecats
Copy link
Contributor

Describe the bug

The ToastCloseEvent interface is defined as follows:

/**
 * Custom close event.
 * @see {@link Toast.onClose}
 */
export interface ToastCloseEvent {
    /**
     * Message of the closed element.
     */
    message?: string;
    /**
     * Index of the removed element.
     */
    index?: number;
}

but:

  • the message field should be of type Message as it's the type currently returned by the inner p-toastItem component.
  • the index field should be removed as it's never set in the onMessageClose event of the p-toast component.

Environment

.

Reproducer

No response

Angular version

16.0.2

PrimeNG version

16.0.0-rc.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.14.1

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@Menecats Menecats added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 23, 2023
Menecats added a commit to Menecats/primeng that referenced this issue May 23, 2023
@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 May 23, 2023
@mertsincan mertsincan added this to the 16.0.0 milestone May 23, 2023
@gucal
Copy link
Contributor

gucal commented May 23, 2023

Thanks for your reporting and contribution.

gucal added a commit that referenced this issue May 23, 2023
Fix #13079 - Wrong type definition of ToastCloseEvent
gucal added a commit that referenced this issue May 23, 2023
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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants