Skip to content

Commit

Permalink
feat: Add TypeScript type definition file (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Mele <jordan.mele@4mation.com.au>
  • Loading branch information
Silic0nS0ldier and Jordan Mele authored Jun 24, 2022
1 parent 0ecaa1e commit b5ce699
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions index.d.ts
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;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"node": ">= 0.10"
},
"main": "index.js",
"types": "index.d.ts",
"files": [
"LICENSE",
"index.js"
Expand Down

0 comments on commit b5ce699

Please sign in to comment.