XRay KOA Library OpenSegment() function type issue in TypeScript
blam135 opened this issue · 2 comments
blam135 commented
Hi there,
I noticed that for the XRay Koa Lib, when injecting the openSegment
function middleware into a Koa app, it throws a type error in the first screenshot when I do the same thing in a TS file as mentioned in the README.
But after a while digging into it, I realised I needed to type it as Koa.Middleware
as shown in the second screenshot. Is it possible we could type this as Koa.Middleware
to prevent the need to do app.use(XRayKOA.openSegment('segment') as Koa.Middleware)
or update the README to make it clear that this is what should be done on a TS file?
Many thanks :)
carolabadeer commented
Definitely, thank you for pointing out this issue!
carolabadeer commented
Fixed in PR #525