Open damusix opened 6 months ago
ready now
While it makes sense to more strictly type the entries, this approach seems too simple/broken.
Eg. the new generics are pointless since any override must extend from
YarValues
/YarFlashes
. It's not possible to dorequest.yar.get<{ a: string }>('a')
if other custom properties have been added toYarValues
.I'm also missing tests around how
set(object)
handles errors. Does it even error, or will it accept any object? There are multiple interesting cases here. Also, it would be nice ifexpect.type()
was used to validate the returned types.
Thank you for the feedback it was very insightful. You actually unblocked my though process given what you alluded to about get<{ a: string }>('a')
. Looking deeper into it, I even overlooked some issues that don't reflect the reality of how the library works. Currently working on an improvement with better types and tests as you suggested. Check back next week!
@kanongil
@kanongil does it address your concerns properly?
@kanongil Mind lending a follow up? This would be cool to be able to use.