Skip to content

Commit

Permalink
Add types
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Apr 14, 2024
1 parent 50bc2fa commit fa2a52c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export = precinct;

/**
* Finds the list of dependencies for the given file
*
* @param {String|Object} content - File's content or AST
* @param {Object} [options]
* @param {String} [options.type] - The type of content being passed in. Useful if you want to use a non-js detective
* @return {String[]}
*/
declare function precinct(content: string | any, options?: {
type?: string;
}): string[];
declare namespace precinct {
/**
* Returns the dependencies for the given file path
*
* @param {String} filename
* @param {Object} [options]
* @param {Boolean} [options.includeCore=true] - Whether or not to include core modules in the dependency list
* @param {Object} [options.fileSystem=undefined] - An alternative fs implementation to use for reading the file path.
* @return {String[]}
*/
function paperwork(filename: string, options?: {
includeCore?: boolean;
fileSystem?: any;
}): string[];
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "12.0.1",
"description": "Unleash the detectives",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"lint": "xo",
"fix": "xo --fix",
Expand Down

0 comments on commit fa2a52c

Please sign in to comment.