mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
435 B
TypeScript
16 lines
435 B
TypeScript
import * as pnp from 'pnpapi';
|
|
|
|
const information = pnp.getPackageInformation(pnp.topLevel);
|
|
|
|
const locator = pnp.findPackageLocator('/foo');
|
|
if (locator !== null) {
|
|
pnp.getPackageInformation(locator).packageDependencies;
|
|
}
|
|
|
|
const resolution1 = pnp.resolveRequest('lodash', '/foo');
|
|
|
|
let resolution2 = pnp.resolveToUnqualified('lodash', '/foo');
|
|
if (resolution2 !== null) {
|
|
resolution2 = pnp.resolveUnqualified(resolution2);
|
|
}
|