I am using VS 2017 and TS 2.2.1
I am getting compilation error: Cannot find name 'Notification'.
When I try to declare the Notification, TS complains that it is already declared in packages\Microsoft.TypeScript.MSBuild.2.2.1\tools\tsc. Indeed, it is there defined as:
declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<string>;
}
I solved the problem by upgrading TypeScript from 1.7.5 to 3.4.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With