kylegoetz
kylegoetz
How about in the `sequenceS` code it check `Object.keys(record).length` and if it's 0, then return Applicative.of({}) but otherwise do what it does now? That should fix the runtime error
Yes, that's what I was talking about. I'll leave the issue open since this is technically a feature request "add to fp-ts" and not a support issue "how can I...
Ah, I got confused about the monoid law. I thought `e` was the multiplicative zero not the multiplicative identity.
@mlegenhausen Should a library be enforcing naming conventions upon the consumers of the library?
This is awesome. Just used this for the first time. I was trying to figure out if I had to write my own applicative instance for my `Item` or something...
In the interim, I tend to write mine like this ```typescript const extractValue = (e:ChangeEvent) => e.target.value declare const transformValue: (a:a) => MyType declare const updateState: (t:MyType) => void const...
I do what @mlegenhausen suggests. We use `io-ts` to define the API contracts. You can define a codec that will validate input to ensure it conforms to the codec's definition,...
I also thing things like `monoid.monoidString` have been moved to their own module, so `import { Monoid } from 'fp-ts/string'`
Actually I apparently cannot write a cookie since that requires me to be in HeadersOpen, but I'm still in AuthenticationOpen phase.
OK what I've settled on is the authentication middleware uses `fromConnection` to `getRequest().rawHeaders` and add a custom header that is the authenticated user. Then I have a `getAuthenticatedUser` middleware that...