I am trying to create an instance of this interface
interface Logger {
(...args: any[]): void;
error(...args: any[]): void;
warn(...args: any[]): void;
info(...args: any[]): void;
verbose(...args: any[]): void;
}
i.e it has to be both callable and it has to be possible to access the properties.
const log: Logger = ...implementation //this is what I am looking for
log('asd') // this should work
log.error('foo') // this should work
How do I achieve this behaviour?