Here is a basic class example:
export class Logger {
constructor(private name: string) {}
debug(...args: any[]) {
console.debug(...args)
}
log(...args: any[]) {
console.log(...args)
}
}
Despite being able to pass anything to console.log
and console.debug
, I encounter the following errors:
.apply(args)
does work, but then what is the purpose of using the...args
syntax?This was tested using TypeScript version 2.2.2.