mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Handle the variadic args for inline console.logs
This commit is contained in:
1 parent
f04c7ed833
commit
f8b7a05777
1 file changed
+3
-3
@@ -975,7 +975,7 @@ namespace ts.server {
|
||||
// the log. This is so that language service plugins which use
|
||||
// console.log don't break the message passing between tsserver
|
||||
// and the client
|
||||
console.log = (msg) => logger.msg(msg, Msg.Info);
|
||||
console.warn = (msg) => logger.msg(msg, Msg.Err);
|
||||
console.error = (msg) => logger.msg(msg, Msg.Err);
|
||||
console.log = (...args) => logger.msg(args.length === 1 ? args[0] : args.join(", "), Msg.Info);
|
||||
console.warn = (...args) => logger.msg(args.length === 1 ? args[0] : args.join(", "), Msg.Err);
|
||||
console.error = (...args) => logger.msg(args.length === 1 ? args[0] : args.join(", "), Msg.Err);
|
||||
}
|
||||
Reference in new issue
Block a user