mirror of
https://github.com/Wessel/pikmin.git
synced 2026-06-06 02:55:47 +02:00
Added the log function to help TypeScript Users
This commit is contained in:
2
index.d.ts
vendored
2
index.d.ts
vendored
@@ -14,7 +14,7 @@ declare namespace Pikmin {
|
||||
public baseFormat: string;
|
||||
public transports: Pikmin.Transport[];
|
||||
|
||||
public [x: string]: function(msg, ...args): void;
|
||||
public log(type: string, msg: string, ...options): void;
|
||||
public addTransport(transport: Pikmin.Transport, options?: { autogen: boolean }): void;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,10 @@ module.exports = class PikminInstance {
|
||||
Pikmin.loggers.set(this.name, this.__log__);
|
||||
}
|
||||
|
||||
log(transportName, msg, ...args) {
|
||||
this[transportName](msg, ...args)
|
||||
}
|
||||
|
||||
addTransport(transport, options = { autogen: false }) {
|
||||
const now = this._formatDate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user