Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion types/npmcli__arborist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ declare namespace Arborist {
* Edges in the dependency graph indicating nodes that this node depends
* on, which resolve its dependencies.
*/
edgesOut: Edge[];
edgesOut: Map<string, Edge>;
/** Edges in the dependency graph indicating nodes that depend on this node. */
edgesIn: Edge[];

Expand All @@ -216,6 +216,8 @@ declare namespace Arborist {

get inBundle(): boolean;

get isWorkspace(): boolean;

/** Errors encountered while parsing package.json or version specifiers. */
errors: Error[];

Expand Down
2 changes: 2 additions & 0 deletions types/npmcli__arborist/npmcli__arborist-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const arb = new Arborist({

arb.loadActual().then(tree => {
tree; // $ExpectType Node
tree.isWorkspace; // $ExpectType boolean
tree.edgesOut; // $ExpectType Map<string, Edge>
});

arb.loadVirtual().then(tree => {
Expand Down