nbubna / store

A better way to use localStorage and sessionStorage
MIT License
1.91k stars 109 forks source link

TypeScript complains that area doesn't exists #100

Closed Hagendorn closed 2 years ago

Hagendorn commented 2 years ago

I updated our project from 2.12.0 to 2.13.1 and now TypeScript says that area does not exist anymore:

Screen Shot 2022-03-11 at 15 25 40

Looks to me that this commit broke the types: https://github.com/nbubna/store/commit/1ca5d1605bfdd8f1662317e8f7182f91d5075439

nbubna commented 2 years ago

Eek! Sorry, total oversight there. Bugfix version coming shortly.

nbubna commented 2 years ago

2.13.2 is out w/fix for this.

Hagendorn commented 2 years ago

Thanks for the fast fix. I have been infected with Corona and could not check it earlier.

mohitgarg commented 1 year ago

Hi @nbubna, I think it's still broke on 2.14.2. I am getting the same error TS2339: Property 'get' does not exist on type 'typeof import("/......../node_modules/store2/index")'.

nbubna commented 1 year ago

But that's not the same error...

mohitgarg commented 1 year ago

Same typescript error I mean. property X doesn't exist on type Y

nbubna commented 1 year ago

This is not an issue for any or all TypeScript complaints. This issue was and still is fixed. Please open a new issue, and provide steps for replication. Because i use store.get all the time in TypeScript without errors. And if you look at the index.d.ts, you can clearly see that StoreType includes StoreBase, which includes StoreAPI, which defines 'get'.

mohitgarg commented 1 year ago

Let me check my tsconfig and try to reproduce it. I'll get back to you. Thank you for replying back. Appreciate the work.