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
This package used to provide a JSONFromString type but it looks like this was removed in v0.5.0. Perhaps this was removed in favour of Either.parseJSON?
However, it would still be useful to provide a JSONFromString type in this package because it's not easy to define yourself using Either.parseJSON.
exportconstJSONFromString=newt.Type<E.Json,string,string>('JSONFromString',// TODO:(x): x is E.Json=>true,(s,c)=>pipe(E.parseJSON(s,(_e)=>'whatever'),E.fold(()=>t.failure(s,c),t.success),),JSON.stringify,);
In order to correctly implement the is function we would need to create a Json runtime type:
🚀 Feature request
This package used to provide a
JSONFromString
type but it looks like this was removed in v0.5.0. Perhaps this was removed in favour ofEither.parseJSON
?However, it would still be useful to provide a
JSONFromString
type in this package because it's not easy to define yourself usingEither.parseJSON
.In order to correctly implement the
is
function we would need to create aJson
runtime type:Would you consider a PR that brings this back?
The text was updated successfully, but these errors were encountered: