Make thread non-variadic
This commit is contained in:
parent
1f64c36e4b
commit
97aff64d23
|
|
@ -2,10 +2,9 @@ import * as R from 'ramda'
|
|||
|
||||
type Transformer = (value: any) => any
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const pipe = R.pipe as unknown as (...fs: Transformer[]) => (value: any) => any
|
||||
|
||||
export const thread = (value: any, ...fs: Transformer[]) => {
|
||||
export const thread = (value: any, fs: Transformer[]) => {
|
||||
const transform = pipe(...fs)
|
||||
|
||||
return transform(value)
|
||||
|
|
|
|||
Loading…
Reference in New Issue