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

useToast.d.ts missing api method definitions #958

Closed
dhax opened this issue Feb 9, 2021 · 0 comments
Closed

useToast.d.ts missing api method definitions #958

dhax opened this issue Feb 9, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@dhax
Copy link

dhax commented Feb 9, 2021

removeGroup and removeAllGroups are defined in ToastService.d.ts but are missing in useToast.d.ts, so TypeScript is complaining here. Trying to import and use ToastService.removeAllGroups() in a component gives a compile error:
Uncaught (in promise) TypeError: primevue_toastservice__WEBPACK_IMPORTED_MODULE_9__.default.removeAllGroup is not a function

Not sure if it is supposed to be called from ToastService only, but the following workaround does the job with useToast:

// eslint-disable-next-line
// @ts-ignore
toast.removeAllGroups();
@mertsincan mertsincan added this to the 3.3.0 milestone Feb 10, 2021
@mertsincan mertsincan added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 10, 2021
@cagataycivici cagataycivici modified the milestones: 3.3.0, 3.2.3 Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

4 participants