diff --git a/package.json b/package.json index 7e55391..a1c58f6 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,24 @@ "main": "build/main/index.js", "typings": "build/main/index.d.ts", "module": "build/module/index.js", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/BowlingX/geschichte.git" }, + "bugs": { + "url": "https://github.com/BowlingX/geschichte/issues" + }, + "homepage": "https://github.com/BowlingX/geschichte#readme", "license": "MIT", - "keywords": [], + "keywords": [ + "react", + "react-hooks", + "hooks", + "history", + "url", + "query-parameters" + ], "scripts": { "describe": "npm-scripts-info", "build": "run-s clean && run-p build:*", diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 99e9472..c46eabb 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -110,7 +110,7 @@ export const applyDiffWithCreateQueriesFromPatch = ( */ export const applyFlatConfigToState = ( config: MappedConfig, - queryValues: object, + queryValues: {readonly [index: string]:any}, ns: string, state: object, initialState: object @@ -142,8 +142,9 @@ export const applyFlatConfigToState = ( * that can be used to generate a query string. * @return a key/value object with the object containing the defined parameters as key. */ -export const flattenConfig = (config: Config, path: readonly string[] = []) => { - return Object.keys(config).reduce((next, key) => { +export const flattenConfig = + (config: Config, path: readonly string[] = []): MappedConfig => { + return Object.keys(config).reduce((next: {readonly [index: string]:any}, key) => { const v = config[key] const nextPath: ReadonlyArray = [...path, key] if (typeof v === 'function') {