Skip to content

Commit

Permalink
(types): enable strict mode
Browse files Browse the repository at this point in the history
- only one real change almost surprisingly
  - guess because I already resolved the implicit any warnings before
  • Loading branch information
agilgur5 committed Jul 8, 2019
1 parent 2ef65ed commit 66f25f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ export const persist: IArgs = (name, store, options = {}) => {
})
}

function arrToDict (arr?: Array<string>): object {
type StrToBoolMap = {[key: string]: boolean}

function arrToDict (arr?: Array<string>): StrToBoolMap {
if (!arr) { return {} }
return arr.reduce((dict, elem) => {
return arr.reduce((dict: StrToBoolMap, elem) => {
dict[elem] = true
return dict
}, {})
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"declaration": true,
"sourceMap": true,
"rootDir": "./",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
Expand Down

0 comments on commit 66f25f8

Please sign in to comment.