Make thread non-variadic

This commit is contained in:
Vasili Karaev 2021-08-05 12:28:57 +03:00
parent 1f64c36e4b
commit 97aff64d23
1 changed files with 1 additions and 2 deletions

View File

@ -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)