Fix most eslint warnings
This commit is contained in:
parent
196aa44895
commit
8d2d39cb0e
6 changed files with 16 additions and 12 deletions
|
|
@ -18,9 +18,10 @@ import keyOf from "utils/keyOf";
|
|||
type UiItemProps<I> = {
|
||||
item: I,
|
||||
state: State,
|
||||
onChangeState: (topic: string, nextState: any) => void
|
||||
onChangeState: (topic: string, nextState: Actual) => void
|
||||
};
|
||||
|
||||
// eslint-disable-next-line flowtype/no-weak-types
|
||||
export default class UiItem<I:Object> extends React.Component<UiItemProps<I>> {
|
||||
constructor(props: UiItemProps<I>) {
|
||||
super(props);
|
||||
|
|
@ -58,7 +59,7 @@ export class UiControl<I: UIControl> extends UiItem<I> {
|
|||
super(props);
|
||||
}
|
||||
|
||||
changeState(next: any) {
|
||||
changeState(next: Actual) {
|
||||
if (this.props.item.topic == null) {
|
||||
throw new Error(
|
||||
`Missing topic in ${this.props.item.type} "${this.props.item.text}"`
|
||||
|
|
@ -131,7 +132,7 @@ export class Toggle extends UiControl<UIToggle> {
|
|||
}
|
||||
|
||||
export class DropDown extends UiControl<UIDropDown> {
|
||||
runPrimaryAction = (next?: any) => {
|
||||
runPrimaryAction = (next?: Actual) => {
|
||||
if (this.isEnabled()) {
|
||||
const control = this.props.item;
|
||||
const keys = _.keys(control.options);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import { Toggle, DropDown, Link, Section, Text } from "./UiItem";
|
|||
export type UiItemListProps = {
|
||||
controls: Array<ControlUI>,
|
||||
state: State,
|
||||
onChangeState: (topic: string, nextState: any) => void
|
||||
onChangeState: (topic: string, nextState: Actual) => void
|
||||
};
|
||||
|
||||
export default class UiItemList extends React.Component<UiItemListProps> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue