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.

TypeScript Definitions Issue

See original GitHub issue

Because of the recent change in TypeScript definitions (from namespace to type) in https://github.com/nbubna/store/commit/1ca5d1605bfdd8f1662317e8f7182f91d5075439, the package is now broken for TypeScript users. I’ve confirmed that store.set() and store.get() work as usually in JavaScript, but because store is now a type in the TS definitions, it can’t be used the same way. (Since our project is written in TS, the latest version of store breaks our builds.)

Is there a change to how we’re supposed to handle the package in TS? Or is this a bug? Either way, would really appreciate some help here.

Thank you!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nbubnacommented, Dec 20, 2021

Ok, 2.13.1 has been published. Thank you, again, for the help with this one! And sorry for the trouble.

1reaction
nbubnacommented, Dec 20, 2021

Thank you, shirblc, for the test repo! And being willing to test. I think i was able to test too, using your repo. I checked it out was able to get the error, then manually tweak the store2 index.d.ts as i show above in the node_modules directory, and ran tsc again. It seems like it does the trick. So i think we’re good. I’ll get a bugfix release out asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Type Declarations - TypeScript
Built-in Type Definitions. TypeScript includes declaration files for all of the standardized built-in APIs available in JavaScript runtimes. This includes ...
Read more >
Typescript: missing type definitions. · Issue #8642 - GitHub
I am opening this issue to report missing types when I notice that. Here is the first: Cookie options type does not have...
Read more >
Problem with Typescript Definitions
I've tried reinstalling Typescript. I've tried invalidating the cache and restarting. My calls to the type definitions seem to be correct.
Read more >
Cannot find name 'describe'. Do you need to install type ...
I'm using Visual Studio Code as my IDE and in my Angular project, and I had to comment-out/remove types in file tsconfig.json and...
Read more >
@types/node - npm
TypeScript definitions for Node.js. Latest version: 18.11.18, last published: 3 days ago. Start using @types/node in your project by running ...
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