nbubna / store

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

How to write .d.ts for extension method(s)? #113

Closed Alsan closed 2 years ago

Alsan commented 2 years ago

I've written some extension methods in typescrypt, and they worked as expected, but vscode always complain those methods aren't defined.

nbubna commented 2 years ago

Honestly, i'm not sure. Maybe you just typecast them in a module as a type that extends the usual one, then import the typecast version when you want to use your extension?