You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if regression.
Works at runtime, but last partition doesn't type check:
import{filter,partition,test,where}from"ramda";exportinterfaceIFoo{bar: string;}constcheck=where({bar: test(/fo/)})constdataList: IFoo[]=[{bar: "foo"},{bar: "baz"}]constdataObj: {[id: string]: IFoo}={one: {bar: "foo"},two: {bar: "baz"}}describe("whereUnit",()=>{it("works with filter",()=>{expect(filter(check,dataList)).toEqual([{bar: "foo"}])expect(filter(check,dataObj)).toEqual({one: {bar: "foo"}})});;it("doesn't with partition",()=>{expect(partition(check,dataList)).toEqual([[{bar: "foo"}],[{bar: "baz"}]])expect(partition(check,dataObj)).toEqual([{one: {bar: "foo"}},{two: {bar: "baz"}}])// see below});})
No overload matches this call.
Overload 1 of 4, '(fn: (a: IFoo) => a is IFoo, list: readonly IFoo[]): [IFoo[], never[]]', gave the following error.
Argument of type '<U>(testObj: U) => boolean' is not assignable to parameter of type '(a: IFoo) => a is IFoo'.
Signature '(testObj: IFoo): boolean' must be a type predicate.
Overload 2 of 4, '(fn: (a: IFoo) => boolean, list: readonly IFoo[]): [IFoo[], IFoo[]]', gave the following error.
Argument of type '{ [id: string]: IFoo; }' is not assignable to parameter of type 'readonly IFoo[]'.
Type '{ [id: string]: IFoo; }' is missing the following properties from type 'readonly IFoo[]': length, concat, join, slice, and 26 more.ts(2769)
Not sure if regression.
Works at runtime, but last
partition
doesn't type check:See also:
The text was updated successfully, but these errors were encountered: