puzpuzpuz / cls-rtracer

Request Tracer - CLS-based request id generation for Express, Fastify, Koa and Hapi, batteries included
MIT License
311 stars 24 forks source link

fix: `runWithId` should return the type of the function passed #33

Closed SimenB closed 4 years ago

SimenB commented 4 years ago

Otherwise doing const thing = rTracer.runWithId(() => '42') would be type any. With this PR the type is string

puzpuzpuz commented 4 years ago

@SimenB thanks for submitting this fix!