Skip to content

Commit 8f66423

Browse files
committed
fixed typing issues with props
1 parent dec4066 commit 8f66423

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"test": "cross-env NODE_ENV=test jest --verbose",
7575
"test:update-snap": "cross-env NODE_ENV=test jest --updateSnapshot",
7676
"test:clear": "cross-env NODE_ENV=test jest --clearCache",
77-
"test:update-snap": "cross-env NODE_ENV=test jest --updateSnapshot",
7877
"linter": "eslint src",
7978
"develop": "concurrently \"npm run dev\" \"npm run electron\""
8079
},

src/components/bottom/Props.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ const availablePropTypes = {
5151
boolean: 'BOOL',
5252
function: 'FUNC',
5353
any: 'ANY',
54-
tuple: 'TUP',
55-
enum: 'ENUM'
54+
tuple: 'TUP'
5655
};
5756

5857
// generates the various options for the prop type selection

src/utils/componentRender.util.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,8 @@ const componentRender = (
4141
return 'boolean';
4242
case 'function':
4343
return '() => any';
44-
// case 'symbol':
45-
// return 'string';
46-
case 'node':
47-
return 'string';
48-
case 'element':
49-
return 'string';
5044
case 'tuple':
5145
return '[any]';
52-
case 'enum':
53-
return '{}';
5446
case 'any':
5547
return 'any';
5648
default:
@@ -183,7 +175,7 @@ const componentRender = (
183175
.join('\n')}
184176
185177
186-
178+
/* Replace "any" with stricter types to reflect your usage*/
187179
interface Props {
188180
${props.map(prop => `${prop.key}: ${typeSwitcher(prop.type)};\n`)}
189181
};

0 commit comments

Comments
 (0)