Extends Console Interface for TypeScript
You can just augment the Console
interface itself. See merging interfaces:
interface Console {
tron: any
}
If you want to augment Console
from inside a module, you have to wrap it inside declare global { }
block. See global augmentation
declare global {
interface Console {
tron: any
}
}