Skip to content

Commit

Permalink
fix: Fix module export for node
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbuchar committed Jun 27, 2020
1 parent a040e7a commit 9064b0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import _unset from 'lodash.unset';
* you would with any other object in JavaScript, and it
* just feels natural.
*/
export type KeyPath = string | Array<string | number>;
type KeyPath = string | Array<string | number>;

/**
* `SettingsValue` types are the datatypes supported by
Expand All @@ -80,13 +80,13 @@ export type KeyPath = string | Array<string | number>;
* const lastLogin = await settings.get('user.lastLogin');
* const lastLoginDate = new Date(lastLogin);
*/
export type SettingsValue = null | boolean | string | number | SettingsObject | SettingsValue[];
type SettingsValue = null | boolean | string | number | SettingsObject | SettingsValue[];

/**
* A `SettingsObject` is an object whose property values
* are of the type `SettingsValue`.
*/
export type SettingsObject = {
type SettingsObject = {
[key: string]: SettingsValue;
};

Expand All @@ -95,7 +95,7 @@ export type SettingsObject = {
* Electron Settings that can be set using
* [[configure|configure()]].
*/
export type Config = {
type Config = {

/**
* Whether or not to save the settings file atomically.
Expand Down Expand Up @@ -140,7 +140,6 @@ const defaultConfig: Config = {
prettify: false,
};


/** @internal */
let config: Config = {
...defaultConfig,
Expand Down Expand Up @@ -960,7 +959,7 @@ function unsetSync(keyPath?: KeyPath): void {
}
}

export default {
export = {
file,
configure,
reset,
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"strict": true,
"module": "commonjs",
"target": "es2015",
"module": "CommonJS",
"target": "ES5",
"outDir": "dist",
"declaration": true,
"sourceMap": true,
Expand Down

0 comments on commit 9064b0f

Please sign in to comment.