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

Temporal fix for compile-time errors on angular apps for "pnotify": "^5.2.0" #413

Open
samuelsonokoi opened this issue Mar 6, 2021 · 2 comments

Comments

@samuelsonokoi
Copy link

samuelsonokoi commented Mar 6, 2021

This might not be a perfect fix but it takes care of the compile-time errors for my angular application.

node_modules/@pnotify/core/Stack.d.ts you will have to modify line 1 to import { Notice } from './';

replace line 193 to 208 with the code below
swap( one: Notice, theOther: Notice, immediate: boolean, waitAfter: boolean ): Promise<unknown>;

replace line 220 with the following
fire(event: string, detail: {}): void;

In @pnotify/core/index.d.ts file replace line 250 with open(immediate?: boolean): Promise<unknown>; and replace line 261 to 265 with close( immediate?: boolean, timerHide?: boolean, waitAfterward?: boolean ): Promise<unknown>;

This fix worked for "pnotify": "^5.2.0", hopefully the next update will fix these error. Ummmm you might have to redo this again if you reinstall the same package.

@brian-mcallister-lab49
Copy link

brian-mcallister-lab49 commented Dec 14, 2021

Hey just wanted to +1 this issue because I'm experiencing the exact same compile time error. For additional context, we're currently using TypeScript v4.3.0 (we're also working on an Angular codebase. I know that was mentioned in #388, although I don't believe the fact that we're using Angular is relevant to this issue).

It seems like there's been an open PR to address this issue here: #398, although the changes in that PR and the changes suggested in this issue are quite different.

I believe the suggestions in this issue are more correct, because in one of the TypeScript errors about Promise (as alluded to by @samuelsonokoi above), it's specifically saying that the generic type Promise requires one type argument.

@hperrin Anything we can do to assist? Possibly open a PR with the changes suggested here?

@danaildinev
Copy link

Thank you, this fix works perfectly on "@pnotify/core": "^5.2.0" and Angular 17 project.

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

No branches or pull requests

3 participants