tslog icon indicating copy to clipboard operation
tslog copied to clipboard

Bug: TRequestIdFunction is too stricly typed

Open jraoult opened this issue 3 years ago • 0 comments

Describe the bug While implementing a request id provider function, I realised that it is supported to return undefined from a TRequestIdFunction despite what the typing is enforcing. The requestId will not be shown in the log trace, which is very handy.

I think the type should be updated to reflect the runtime behaviour:

export type TRequestIdFunction = () => string | undefined;

jraoult avatar May 03 '22 18:05 jraoult