You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is all you should have to do no matter if you decorate the console or a random object.
require('better-logging')(console);
If you decorate a random object the types for the console is still being updated (since its a global type extension)
constbetter={};if(!require('better-logging').default(better))throw'This will never happen';better.line();// ts-valid, runtime-validconsole.line();// ts-valid, runtime-error
The text was updated successfully, but these errors were encountered:
Apparently it might work better if we use const better = {} instead of let better = {}... for some reason ts thinks const makes the object immutable... that seems like a bug/oversight
The text was updated successfully, but these errors were encountered: