Skip to content

Commit c7b0c7a

Browse files
authoredAug 30, 2020
feat(redux-devtools-inspector): convert to TypeScript (#623)
* stash * stash * stash * stash * preset * @types/dragula
1 parent 3cd1ae1 commit c7b0c7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1369
-624
lines changed
 

‎package.json

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"@babel/cli": "^7.10.5",
55
"@babel/core": "^7.11.1",
66
"@babel/plugin-proposal-class-properties": "^7.10.4",
7+
"@babel/plugin-transform-runtime": "^7.11.0",
78
"@babel/preset-env": "^7.11.0",
89
"@babel/preset-typescript": "^7.10.4",
910
"@types/jest": "^26.0.9",
@@ -14,12 +15,16 @@
1415
"@typescript-eslint/parser": "^3.9.0",
1516
"babel-eslint": "^10.1.0",
1617
"babel-loader": "^8.1.0",
18+
"clean-webpack-plugin": "^3.0.0",
19+
"cross-env": "^7.0.2",
1720
"eslint": "^7.6.0",
1821
"eslint-config-prettier": "^6.11.0",
1922
"eslint-plugin-babel": "^5.3.1",
2023
"eslint-plugin-jest": "^23.20.0",
2124
"eslint-plugin-prettier": "^3.1.4",
2225
"eslint-plugin-react": "^7.20.5",
26+
"fork-ts-checker-webpack-plugin": "^5.1.0",
27+
"html-webpack-plugin": "^4.3.0",
2328
"jest": "^26.2.2",
2429
"lerna": "^3.22.1",
2530
"prettier": "^2.0.5",

‎packages/react-base16-styling/src/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const mergeStylings = (
142142

143143
const getStylingByKeys = (
144144
mergedStyling: StylingConfig,
145-
keys: string | string[],
145+
keys: (string | false | undefined) | (string | false | undefined)[],
146146
...args: any[]
147147
): Styling => {
148148
if (keys === null) {
@@ -153,7 +153,9 @@ const getStylingByKeys = (
153153
keys = [keys];
154154
}
155155

156-
const styles = keys.map((key) => mergedStyling[key]).filter(Boolean);
156+
const styles = keys
157+
.map((key) => mergedStyling[key as string])
158+
.filter(Boolean);
157159

158160
const props = styles.reduce(
159161
(obj, s) => {

0 commit comments

Comments
 (0)
Please sign in to comment.