-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add TypeScript type definition file (#12)
Co-authored-by: Jordan Mele <jordan.mele@4mation.com.au>
- Loading branch information
1 parent
0ecaa1e
commit b5ce699
Showing
2 changed files
with
37 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Highest log level. Typically used for debugging purposes. | ||
* | ||
* If the first argument is a string, all arguments are passed to node's util.format() before being emitted. | ||
* @param msg Message to log | ||
* @param args Arguments to format message with via util.format() | ||
*/ | ||
export function debug(msg: string, ...args: any[]): void; | ||
export function debug(msg: any): void; | ||
/** | ||
* Standard log level. Typically used for user information. | ||
* | ||
* If the first argument is a string, all arguments are passed to node's util.format() before being emitted. | ||
* @param msg Message to log | ||
* @param args Arguments to format message with via util.format() | ||
*/ | ||
export function info(msg: string, ...args: any[]): void; | ||
export function info(msg: any): void; | ||
/** | ||
* Warning log level. Typically used for warnings. | ||
* | ||
* If the first argument is a string, all arguments are passed to node's util.format() before being emitted. | ||
* @param msg Message to log | ||
* @param args Arguments to format message with via util.format() | ||
*/ | ||
export function warn(msg: string, ...args: any[]): void; | ||
export function warn(msg: any): void; | ||
/** | ||
* Error log level. Typically used when things went horribly wrong. | ||
* | ||
* If the first argument is a string, all arguments are passed to node's util.format() before being emitted. | ||
* @param msg Message to log | ||
* @param args Arguments to format message with via util.format() | ||
*/ | ||
export function error(msg: string, ...args: any[]): void; | ||
export function error(msg: any): void; |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
"node": ">= 0.10" | ||
}, | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"LICENSE", | ||
"index.js" | ||
|