yosuke-furukawa/server-timing

Typescript is not happy with the new index.d.ts

teolag opened this issue · 4 comments

node_modules/server-timing/index.d.ts:8:18 - error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context.

8   export default (opts?: Options) => e.RequestHandler;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/server-timing/index.d.ts:8:40 - error TS2339: Property 'RequestHandler' does not exist on type 'typeof e'.

8   export default (opts?: Options) => e.RequestHandler;
                                         ~~~~~~~~~~~~~~

It seems other ones has solved it by declaring a variable and then exporting it as default

const _default: (opts?: Options) => e.RequestHandler;
export default _default;

I will investigate it. Thank you!

What version is your TS? We are using 3.7 - 3.8. the messages are not shown.

I'm using the latest. 3.8

released 3.1.1 PTAL