kjelsrud.dev/node_modules/which-pm/index.d.ts

26 lines
417 B
TypeScript
Raw Normal View History

2023-07-19 21:31:30 +02:00
declare function whichpm (pkgPath: string): Promise<whichpm.Result>
declare namespace whichpm {
type Result = NPM | YARN | PNPM | Other
interface NPM {
readonly name: 'npm'
}
interface YARN {
readonly name: 'yarn'
}
interface PNPM {
readonly name: 'pnpm'
readonly version: string
}
interface Other {
readonly name: string
readonly version?: string
}
}
export = whichpm