Merge pull request #26125 from 0xProject/feature/lerna-get-packages

Add types for lerna-get-packages
This commit is contained in:
Daniel Rosenwasser
2018-05-29 16:40:31 -07:00
committed by GitHub
4 changed files with 40 additions and 0 deletions

19
types/lerna-get-packages/index.d.ts vendored Normal file
View File

@@ -0,0 +1,19 @@
// Type definitions for lerna-get-packages 1.0
// Project: https://github.com/azz/lerna-get-packages
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface LernaPackage {
location: string;
package: {
private?: boolean;
version: string;
name: string;
main?: string;
config?: {
additionalTsTypings?: string[];
};
};
}
declare function lernaGetPackages(path: string): LernaPackage[];
export = lernaGetPackages;

View File

@@ -0,0 +1,4 @@
import lernaGetPackages = require('lerna-get-packages');
const packages = lernaGetPackages('.');
packages.map(p => p.location);

View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "lerna-get-packages-tests.ts"]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }