Skip to content

Commit

Permalink
feat(project): Add JSDoc type annotations to primary export
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Dec 9, 2020
1 parent a4e7c78 commit 8443ad3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/project/index.js
Expand Up @@ -16,6 +16,19 @@ const { applyExtends } = require("./lib/apply-extends");
const { deprecateConfig } = require("./lib/deprecate-config");
const { makeFileFinder, makeSyncFileFinder } = require("./lib/make-file-finder");

/**
* @typedef {object} ProjectConfig
* @property {string[]} packages
* @property {boolean} useWorkspaces
* @property {string} version
*/

/**
* A representation of the entire project managed by Lerna.
*
* Wherever the lerna.json file is located, that is the project root.
* All package globs are rooted from this location.
*/
class Project {
/**
* @param {string} [cwd] Defaults to process.cwd()
Expand Down Expand Up @@ -72,6 +85,7 @@ class Project {
throw err;
}

/** @type {ProjectConfig} */
this.config = loaded.config;
this.rootConfigLocation = loaded.filepath;
this.rootPath = path.dirname(loaded.filepath);
Expand Down

0 comments on commit 8443ad3

Please sign in to comment.