question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the bug When using typescript, addNotification() definition does not take argument. so on VSCode, it shows errors.

To Reproduce

<script lang="ts">
  import { getNotificationsContext } from 'svelte-notifications'
  const { addNotification } = getNotificationsContext()

  // VScode shows errors: Expected 0 arguments, but got 1.ts(2554)
  addNotification({
          text: 'TestCase created',
          type: 'success',
          position: 'top-right',
          removeAfter: 2000
        })

Expected behavior Should be no error

Screenshots

Screen Shot 2021-07-13 at 11 05 55 AM Screen Shot 2021-07-13 at 11 06 03 AM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
shaozicommented, Jul 15, 2021
0reactions
usernamuscommented, Dec 16, 2021

@apirogov @shaozi I released a new version. If everything was fixed, please let me know so that I can close the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Understanding Errors - TypeScript
Whenever TypeScript finds an error, it tries to explain what went wrong in as much detail as possible. Because its type system is...
Read more >
Get a catch block error message with TypeScript - Kent C. Dodds
TypeScript forces you to acknowledge you can't know what was thrown making getting the error message a pain. Here's how you can manage...
Read more >
Error - JavaScript - MDN Web Docs - Mozilla
Error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions.
Read more >
Exception Handling - TypeScript Deep Dive - Gitbook
Creates an instance representing an error that occurs when a numeric variable or parameter is outside of its valid range.
Read more >
TypeScript errors and how to fix them
TypeScript errors and how to fix them. Common Errors. Below you find a list of common TypeScript errors along with the buggy code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found