From 49a73e25720f94056929b17ec15aa421daa73870 Mon Sep 17 00:00:00 2001 From: Mark Edington Date: Sat, 21 Jul 2018 11:07:57 -0700 Subject: [PATCH 1/2] Fix Typescript compilation issue #45 - Disable new keyOf behavior in Typescript 2.9 - Upgrade to more recent redux-devtools-extension to fix missing reference to GenericStoreEnhancer --- package-lock.json | 6 +++--- package.json | 2 +- tsconfig.json | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7fda071a..03c6edf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8076,9 +8076,9 @@ } }, "redux-devtools-extension": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/redux-devtools-extension/-/redux-devtools-extension-2.13.2.tgz", - "integrity": "sha1-4Pmo6N/KfBe+kscSSVijuU6ykR0=", + "version": "2.13.5", + "resolved": "https://registry.npmjs.org/redux-devtools-extension/-/redux-devtools-extension-2.13.5.tgz", + "integrity": "sha512-QQ9BRy77oURHMdGys9rfQcCQDzXZ1T4oW+eUyE5Cg7DNVau69HJzc4YNDMOmpi0Dzpi1zOQgQ2rUpgJta4Lfqg==", "dev": true }, "regenerate": { diff --git a/package.json b/package.json index 776fe9da..a620bec3 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "postcss-url": "^7.3.2", "prettier": "^1.13.5", "react-hot-loader": "^4.3.1", - "redux-devtools-extension": "^2.13.2", + "redux-devtools-extension": "^2.13.5", "style-loader": "^0.21.0", "ts-loader": "^4.4.1", "typescript": "^2.9.1", diff --git a/tsconfig.json b/tsconfig.json index b8eb8887..9e54c976 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "removeComments": true, "noImplicitReturns": true, "noUnusedLocals": true, + "keyofStringsOnly": true, "strict": true, "outDir": "build", "lib": ["es6", "es7", "dom"], From 20e47cae955d049e43bd251255cd474f3141f3d8 Mon Sep 17 00:00:00 2001 From: Youngrok Kim Date: Sun, 22 Jul 2018 18:00:58 +0900 Subject: [PATCH 2/2] Add SimpleKeyOf type, resolves #45 --- tsconfig.json | 1 - types/global.d.ts | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 9e54c976..b8eb8887 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,6 @@ "removeComments": true, "noImplicitReturns": true, "noUnusedLocals": true, - "keyofStringsOnly": true, "strict": true, "outDir": "build", "lib": ["es6", "es7", "dom"], diff --git a/types/global.d.ts b/types/global.d.ts index 231989b6..360795a2 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -7,7 +7,8 @@ declare module '*.css' { } // Omit type https://github.com/Microsoft/TypeScript/issues/12215 +type SimpleKeyOf = Extract; type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; -type Omit = { [P in Diff]: T[P] }; +type Omit> = { [P in Diff, K>]: T[P] }; type PartialPick = Partial & Pick;