-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
ElectronStore
type does not export get
, set
, or delete
#276
Comments
Make sure you have the correct tsconfig. |
The methods are inherited from |
I have checked the import {type Except} from 'type-fest';
import Conf, {type Options as ConfigOptions} from '../conf/dist/source/types';
export {Schema} from '../conf/dist/source/types'; I am using over 1k (sub-)dependencies in the Electron project that just work fine how I setup the ESM environment, including native modules. Thus, I assume something with |
same problem |
I also have the same problem. |
I'm also having the same problem, and would also like to reiterate @raphaelmenges comment:
|
After using the latest version, I also encountered the same problem and had to use Anyscript! |
Can you confirm you have I tried adding this to an existing TypeScript project and it compiles fine for me ( |
I have PS: Using the mentioned template, I could reproduce the error in a minimal fashion: https://github.com/raphaelmenges/electron-store-type-error |
TypeScript does not treat your project as fully ESM unless you have |
Then I suggest opening an issue there. That config is incorrect. |
@sindresorhus hi, I added code that solves this error, please have a look at it sindresorhus/conf#193 |
Locking this as it seems clear the culprit is incorrect tsconfig. Here is an example of a correct tsconfig: https://github.com/sindresorhus/tsconfig/blob/main/tsconfig.json |
Hi 👋,
I have upgraded the electron-store from
8.2.0
to9.0.0
. Thanks for moving to ESM!Suddenly, Typescript complains that the methods
get
,set
, ordelete
are not available forElectronStore
. I looked up the type definition and the methods are neither defined in8.2.0
nor in9.0.0
. I am not sure why my typecheck did not complain before.Perhaps I am missing something in migrating from
8.2.0
to9.0.0
?The text was updated successfully, but these errors were encountered: