import ElectronStore = require('electron-store');

new ElectronStore({
    defaults: {}
});

new ElectronStore({
    name: 'myConfiguration',
    cwd: 'unicorn'
});

const electronStore = new ElectronStore();

electronStore.set('foo', 'bar');
electronStore.set({
    foo: 'bar',
    foo2: 'bar2'
});
electronStore.delete('foo');
electronStore.get('foo');
electronStore.get('foo', 42);
electronStore.has('foo');
electronStore.clear();

electronStore.openInEditor();

electronStore.size;
electronStore.store;

electronStore.store = {
    foo: 'bar'
};

electronStore.path;

interface SampleStore {
    enabled: boolean;
    interval: number;
}

const typedElectronStore = new ElectronStore<SampleStore>({
    defaults: {
        enabled: true,
        interval: 30000,
    },
});

const interval: number = typedElectronStore.get('interval');
const enabled = false;
typedElectronStore.set('enabled', enabled);
typedElectronStore.set({
    enabled: true,
    interval: 10000,
});

import ElectronStore = require('electron-store');

new ElectronStore({
  defaults: {}
});

new ElectronStore({
  name: 'myConfiguration',
  cwd: 'unicorn'
});

const electronStore = new ElectronStore();

electronStore.set('foo', 'bar');
electronStore.set({
  foo: 'bar',
  foo2: 'bar2'
});
electronStore.delete('foo');
electronStore.get('foo');
electronStore.get('foo', 42);
electronStore.has('foo');
electronStore.clear();

electronStore.openInEditor();

electronStore.size;
electronStore.store;

electronStore.store = {
  foo: 'bar'
};

electronStore.path;

--- 
+++ 
@@ -1,20 +1,20 @@
 import ElectronStore = require('electron-store');
 
 new ElectronStore({
-  defaults: {}
+    defaults: {}
 });
 
 new ElectronStore({
-  name: 'myConfiguration',
-  cwd: 'unicorn'
+    name: 'myConfiguration',
+    cwd: 'unicorn'
 });
 
 const electronStore = new ElectronStore();
 
 electronStore.set('foo', 'bar');
 electronStore.set({
-  foo: 'bar',
-  foo2: 'bar2'
+    foo: 'bar',
+    foo2: 'bar2'
 });
 electronStore.delete('foo');
 electronStore.get('foo');
@@ -28,7 +28,27 @@
 electronStore.store;
 
 electronStore.store = {
-  foo: 'bar'
+    foo: 'bar'
 };
 
 electronStore.path;
+
+interface SampleStore {
+    enabled: boolean;
+    interval: number;
+}
+
+const typedElectronStore = new ElectronStore<SampleStore>({
+    defaults: {
+        enabled: true,
+        interval: 30000,
+    },
+});
+
+const interval: number = typedElectronStore.get('interval');
+const enabled = false;
+typedElectronStore.set('enabled', enabled);
+typedElectronStore.set({
+    enabled: true,
+    interval: 10000,
+});
Add tests for typed store
