Been playing around with a typesafe middleware pat...
# random
s
Been playing around with a typesafe middleware pattern for my lambdas...
Still a work in progress, but feels like it's heading the right direction.
f
big big fan of ur commenting style
t
great work, always love clever uses of ts inference
a
Why not using middy?
t
also another approach idk if you've considered is you can have the callback return just the fields it wants to add and you merge it in - then you could use inference to get that type instead of requiring them to pass it
r
Interesting, how’s the
lambda()
function defined?
s
@Adrián Mouly I'm not a fan of the Middy API and found it hard to type.
@thdxr I'll play with that idea, ta for the tip. would be amazing to utilise full inference.
@Ross Coundon I'll happily share the source once I've gotten it past the rough prototype stage