mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Add types for pkg-up (#30570)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
3b1a21e700
commit
4d24ec8a7e
12
types/pkg-up/index.d.ts
vendored
Normal file
12
types/pkg-up/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for pkg-up 2.0
|
||||
// Project: https://github.com/sindresorhus/pkg-up#readme
|
||||
// Definitions by: Emily Marigold Klassen <https://github.com/forivall>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = pkgUp;
|
||||
|
||||
declare function pkgUp(cwd?: string): Promise<string>;
|
||||
|
||||
declare namespace pkgUp {
|
||||
function sync(cwd?: string): string;
|
||||
}
|
||||
6
types/pkg-up/pkg-up-tests.ts
Normal file
6
types/pkg-up/pkg-up-tests.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import pkgUp = require('pkg-up');
|
||||
|
||||
pkgUp().then(filepath => {
|
||||
filepath;
|
||||
// => '/Users/sindresorhus/foo/package.json'
|
||||
});
|
||||
23
types/pkg-up/tsconfig.json
Normal file
23
types/pkg-up/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"pkg-up-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/pkg-up/tslint.json
Normal file
1
types/pkg-up/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user