Skip to content

Commit

Permalink
type(libs): add custom typedefs
Browse files Browse the repository at this point in the history
  • Loading branch information
georgelima committed Jan 29, 2019
1 parent c23c521 commit 408b65a
Show file tree
Hide file tree
Showing 10 changed files with 1,035 additions and 85 deletions.
1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
flow-custom-typedefs/*.js
3 changes: 2 additions & 1 deletion .flowconfig
@@ -1,11 +1,12 @@
[ignore]
.*/node_modules/polished/.*
./__tests__
./__tests__/**.js

[include]

[libs]
flow-typed
flow-custom-typedefs

[lints]

Expand Down
8 changes: 8 additions & 0 deletions coverage.json
@@ -0,0 +1,8 @@
{
"concurrentFiles": 1,
"globExcludePatterns": ["node_modules/**", "dist/*.js"],
"flowCommandPath": "./node_modules/.bin/flow",
"globIncludePatterns": ["app/**/*.js", "config/**/*.js", "services/**/*.js", "utils/**/*.js"],
"threshold": 70,
"reportTypes": ["html"]
}
24 changes: 24 additions & 0 deletions flow-custom-typedefs/electron-store.js
@@ -0,0 +1,24 @@
declare module 'electron-store' {
declare class ElectronStore {
constructor({
defaults?: Object,
name?: string,
cwd?: string,
encryptionKey?: string | Buffer,
fileExtension?: string,
}): ElectronStore;

set(key: string, value: string): void;
set(payload: Object): void;
get(key: string): string;
has(key: string): boolean;
delete(key: string): void;
clear(): void;
size: number;
store: Object;
path: string;
openInEditor(): void;
}

declare export default typeof ElectronStore;
}

0 comments on commit 408b65a

Please sign in to comment.