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

WebWorker NotificationOptions type issue #58674

Closed
unadlib opened this issue May 28, 2024 · 2 comments
Closed

WebWorker NotificationOptions type issue #58674

unadlib opened this issue May 28, 2024 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@unadlib
Copy link

unadlib commented May 28, 2024

🔎 Search Terms

TS2769

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions 5.0 and 5.4.5
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

No response

💻 Code

in ServiceWorker.

self.registration.showNotification(`test`, {
      actions: [
        {
          action: 'ignoreCall',
          title: 'test',
        },
        {
          action: 'answerCall',
          title: 'test',
        },
      ],
    });

/** MDN Reference */
showNotification(title: string, options?: NotificationOptions): Promise;

🙁 Actual behavior

No overload matches this call.
Overload 1 of 2, '(title: string, options?: NotificationOptions | undefined): Promise', gave the following error.
Object literal may only specify known properties, and 'actions' does not exist in type 'NotificationOptions'.
Overload 2 of 2, '(title: string, options?: NotificationOptions | undefined): Promise', gave the following error.
Object literal may only specify known properties, and 'actions' does not exist in type 'NotificationOptions'.ts(2769)
(property) actions: {
action: string;
title: string;
}[]

🙂 Expected behavior

There should be no error message

Additional information about the issue

No response

@jcalz
Copy link
Contributor

jcalz commented May 28, 2024

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Jun 7, 2024
@typescript-bot
Copy link
Collaborator

This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants