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
composeIso does not accept an instance created via the iso.iso constructor.
Expected behavior
Both constructors must work with composeIso method.
Reproducible example
import{iso,Iso,Lens}from"monocle-ts";typeInput={data: [string,string][]};typeOutput={data: {[id: string]: string}};constdata=Lens.fromProp<Input>()("data");constiso1=newIso<Input["data"],Output["data"]>(()=>{thrownewError("unimplemented");},()=>{thrownewError("unimplemented");});constiso2=iso.iso<Input["data"],Output["data"]>(()=>{thrownewError("unimplemented");},()=>{thrownewError("unimplemented");});data.composeIso(iso1);// this works!data.composeIso(iso2);// type check error: Type 'Iso<[string, string][], { [id: string]: string; }>' is missing the following properties from type 'Iso<[string, string][], { [id: string]: string; }>': _tag, unwrap, to, wrap, and 19 more.
My environment
Software
Version(s)
monocle-ts
2.3.10
fp-ts
2.11.1
TypeScript
3.9.10
The text was updated successfully, but these errors were encountered:
🐛 Bug report
Current Behavior
composeIso
does not accept an instance created via theiso.iso
constructor.Expected behavior
Both constructors must work with
composeIso
method.Reproducible example
My environment
The text was updated successfully, but these errors were encountered: