Skip to content

useToast.d.ts missing api method definitions #958

Closed
@dhax

Description

@dhax

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();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions