-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from ffflorian/fix/types
fix: Corrected types
- Loading branch information
Showing
1 changed file
with
26 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,37 @@ | ||
/** Declaration file generated by dts-gen */ | ||
declare function logdown(prefix: string, opts?: logdown.LogdownOptions): logdown.Logger; | ||
|
||
export = logdown; | ||
declare namespace logdown { | ||
type LoggerState = { isEnabled: boolean }; | ||
type TransportFunction = (options: TransportOptions) => void; | ||
|
||
declare class logdown { | ||
constructor(prefix: any, opts: any); | ||
interface LogdownOptions { | ||
logger?: any; | ||
markdown?: boolean; | ||
prefix?: string; | ||
prefixColor?: string; | ||
} | ||
|
||
debug(...args: any[]): void; | ||
interface TransportOptions { | ||
args: any[]; | ||
instance: string; | ||
level: string; | ||
msg: string; | ||
state: LoggerState; | ||
} | ||
|
||
error(...args: any[]): void; | ||
const transports: TransportFunction[]; | ||
|
||
info(...args: any[]): void; | ||
class Logger { | ||
constructor(prefix: string, opts?: LogdownOptions); | ||
|
||
debug(...args: any[]): void; | ||
error(...args: any[]): void; | ||
info(...args: any[]): void; | ||
log(...args: any[]): void; | ||
|
||
warn(...args: any[]): void; | ||
|
||
static disable(...args: any[]): void; | ||
|
||
static enable(...args: any[]): void; | ||
|
||
state: LoggerState; | ||
} | ||
} | ||
|
||
declare namespace logdown { | ||
namespace disable { | ||
const prototype: { | ||
}; | ||
|
||
} | ||
|
||
namespace enable { | ||
const prototype: { | ||
}; | ||
|
||
} | ||
|
||
namespace prototype { | ||
function debug(...args: any[]): void; | ||
|
||
function error(...args: any[]): void; | ||
|
||
function info(...args: any[]): void; | ||
|
||
function log(...args: any[]): void; | ||
|
||
function warn(...args: any[]): void; | ||
|
||
namespace debug { | ||
const prototype: { | ||
}; | ||
|
||
} | ||
|
||
namespace error { | ||
const prototype: { | ||
}; | ||
|
||
} | ||
|
||
namespace info { | ||
const prototype: { | ||
}; | ||
|
||
} | ||
|
||
namespace log { | ||
const prototype: { | ||
}; | ||
|
||
} | ||
|
||
namespace warn { | ||
const prototype: { | ||
}; | ||
|
||
} | ||
|
||
} | ||
|
||
} | ||
export = logdown; |