tslog
tslog copied to clipboard
Bug: TRequestIdFunction is too stricly typed
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;