Fix Slider typing

This commit is contained in:
Jordan Eldredge 2019-02-16 06:19:25 -08:00
parent 96128298a2
commit e476f1c7df
3 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@ import React from "react";
import { connect } from "react-redux";
import Slider from "rc-slider";
import { SET_BAND_FOCUS, UNSET_FOCUS } from "../../actionTypes";
import { AppState, Dispatch, Band as BandType } from "../../types";
import { AppState, Dispatch, Slider as SliderType } from "../../types";
interface StateProps {
value: number;
@ -14,7 +14,7 @@ interface DispatchProps {
}
interface OwnProps {
id: string;
band: BandType;
band: SliderType;
onChange(value: number): void;
}

View file

@ -1,4 +1,4 @@
import { Action, Band } from "../types";
import { Action, Slider } from "../types";
import {
SET_FOCUS,
SET_BAND_FOCUS,
@ -10,7 +10,7 @@ import {
export interface UserInputState {
focus: string | null; // TODO: Convert this to an enum?
bandFocused: Band | null;
bandFocused: Slider | null;
scrubPosition: number;
userMessage: string | null;
}

View file

@ -219,7 +219,7 @@ export type Action =
| {
type: "SET_BAND_FOCUS";
input: string;
bandFocused: Band;
bandFocused: Slider;
}
| {
type: "UNSET_FOCUS";