Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Feb 10, 2020
1 parent 9f353c8 commit ad6a836
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/editable-list/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import SmallCrossOutlineIcon from '../icons/cross-outline-small';
import ReorderIcon from '../icons/reorder';
Expand Down Expand Up @@ -32,10 +31,6 @@ export class EditableList extends Component<Props> {
reorderingOffsetY: number = 0;
reorderingTranslateY: number = 0;

static propTypes = {
editing: PropTypes.bool.isRequired,
};

static defaultProps = {
getItemKey: (item: T.TagEntity) => item.id,
};
Expand Down
4 changes: 4 additions & 0 deletions lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ export type TranslatableString = string;
// Language and Platform
///////////////////////////////////////

// Returns a type with the properties in T not also present in U
export type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };

// Either type T or type U, a powered-up union/sum type
// useful when missing a discriminating property
export type XOR<T, U> = T | U extends object
? (Without<T, U> & U) | (Without<U, T> & T)
: T | U;

0 comments on commit ad6a836

Please sign in to comment.