I think the types on parse() could be improved. It's using a generic which doesn't make sense imo. result is always an object, and since const value is always a string, result should be typed as { [key: string]: string }. parse() returns result, and as such its return type should just be Record<string, string>.
I think the types on
parse()
could be improved. It's using a generic which doesn't make sense imo.result
is always an object, and sinceconst value
is always a string,result
should be typed as{ [key: string]: string }
.parse()
returnsresult
, and as such its return type should just beRecord<string, string>
.