Skip to content

Commit

Permalink
fix(TypeScript): Typescript unused imports (#176)
Browse files Browse the repository at this point in the history
* Remove unused TypeScript imports

* Add missing JSDoc elements in multiple storybook example
  • Loading branch information
pbomb authored and Kent C. Dodds committed Sep 5, 2017
1 parent be20364 commit 9f0f1a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions stories/examples/multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ class MultipleAutocomplete extends React.Component {
*
* Given that ['Black', 'Blue', 'Green'], and 'Blue' is selected
* Output: { 'Black': 0, 'Green': 1 }
*
* @param {String[]} items items
* @param {String[]} values selected items
* @return {Object} Mapping of selected items to their indices
*/
function mapItemIndex(items, values) {
return items
Expand Down
2 changes: 1 addition & 1 deletion test/custom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class App extends React.Component<Props, State> {
getItemProps,
selectedItem,
isOpen,
}) => (
}: ControllerStateAndHelpers) => (
<div style={{ position: 'relative' }}>
<div {...getButtonProps()}>{selectedItem}</div>
<CustomList isOpen={isOpen}>
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"jsx": "react"
"jsx": "react",
"noUnusedLocals": true
},
"include": [
"test/**/*.tsx"
Expand Down

0 comments on commit 9f0f1a2

Please sign in to comment.