mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 09:37:17 +00:00
Fix typing to avoid extra import
This commit is contained in:
parent
a52c63ea42
commit
d68565682a
1 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,13 @@
|
|||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import Slider from "rc-slider";
|
||||
|
||||
// Here we import the rc-slider class just to get it's type.
|
||||
// We expect the Typescript compiler to not actually include this in the bundle.
|
||||
import RcSlider from "rc-slider";
|
||||
// @ts-ignore
|
||||
import SliderComponent from "rc-slider/lib/Slider";
|
||||
// Here we inform TypeScript to use the default export's type for our partial import.
|
||||
const Slider = SliderComponent as typeof RcSlider;
|
||||
|
||||
import { setPlaylistScrollPosition } from "../../actionCreators";
|
||||
import { getVisibleTrackIds, getPlaylistScrollPosition } from "../../selectors";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue