Skip to content

Commit b4d5a51

Browse files
authored
🤖 Merge PR DefinitelyTyped#74288 [@npmcli/arborist] correctly export Arborist as constructor not instance by @forivall
1 parent e0a3d3e commit b4d5a51

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎types/npmcli__arborist/index.d.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ declare class Arborist extends EventEmitter {
4242
/** returns a set of root dependencies, excluding dependencies that are exclusively workspace dependencies */
4343
excludeWorkspacesDependencySet(tree: Arborist.Node): Set<Arborist.Node>;
4444
}
45+
type ArboristConstructor = typeof Arborist;
4546

4647
declare namespace Arborist {
47-
const Arborist: Arborist;
48+
const Arborist: ArboristConstructor;
4849
interface Options extends PacoteOptions, Partial<Pick<import("cacache").get.Options, "memoize">> {
4950
path?: string;
5051
nodeVersion?: string;

‎types/npmcli__arborist/npmcli__arborist-tests.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const arb = new Arborist({
1515
progress: true,
1616
formatPackageLock: true,
1717
});
18+
new Arborist.Arborist();
1819

1920
arb.loadActual().then(tree => {
2021
tree; // $ExpectType Node

0 commit comments

Comments
 (0)