tslog
tslog copied to clipboard
Bug: interface is missing optional hostname
Describe the bug
Compiler complains Property 'hostname' does not exist on type 'IMeta'.
However it does exist, maybe not in all cases.
To Reproduce Try to access the logObj
Expected behavior Interface is extended with all parameters, something like:
export interface IMeta extends IMetaStatic {
date: Date;
logLevelId: number;
logLevelName: string;
hostname?: string;
path?: IStackFrame;
}
How can I reproduce this?
See this stackblitz:
https://stackblitz.com/edit/nodets-csuh1z?file=src%2Fmain.ts
src/main.ts:14:41 - error TS2339: Property 'hostname' does not exist on type 'IMeta'.
14 console.log(`hostname: ${output._meta.hostname}`)
~~~~~~~~
Found 1 error in src/main.ts:14