I am passing d3 linear scales into a function using typescript.
import {scaleLinear} from 'd3-scale'
const myScale = scaleLinear().domain([0,10]).range([0,1])
const myFunc = (myScale : ScaleLinear<what, where, why>) => {
//draw something
}
I looked at @types d3 scale documentation and found this line
export interface ScaleLinear<Range, Output, Unknown = never> extends ScaleContinuousNumeric<Range, Output, Unknown> {
//...
}
but it really doesn't clear anything up for me.
I think I need to put some info inside the ScaleLinear brackets <> but I don't know what.
Any tips?