bbc / flashheart

A fully-featured Node.js REST client built for ease-of-use and resilience
Other
114 stars 24 forks source link

Logger can't assign with console in Typescript #93

Open cloud-hai-vo opened 5 years ago

cloud-hai-vo commented 5 years ago

Hi @nspragg,

Have type error in our current logger when try to use the console for logger https://github.com/bbc/flashheart/blob/master/src/core/clientParams.ts#L20

interface LogMethod {
  (message: string, callback: LogCallback): Logger;
  (message: string, meta: any, callback: LogCallback): Logger;
  (message: string, ...meta: any[]): Logger;
  (infoObject: object): Logger;
}

image

Do I need to do have custom class to implement the Logger interface?

nspragg commented 5 years ago

@cloud-hai-vo - is this still have issue for you?

cloud-hai-vo commented 5 years ago

Hi @nspragg,

I do a workaround for it. In typescript still get the error with compiler