mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
add typings for resolve-pkg
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Type definitions for resolve-pkg 1.0
|
||||
// Project: https://github.com/sindresorhus/resolve-pkg
|
||||
// Definitions by: Meno Abels <https://github.com/mabels>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.9
|
||||
|
||||
interface ResolvePkgOptions {
|
||||
cwd?: boolean;
|
||||
}
|
||||
|
||||
type ResolveFunction = (moduleId: string, options?: ResolvePkgOptions) => string;
|
||||
declare const resolveFunction: ResolveFunction;
|
||||
|
||||
export = resolveFunction;
|
||||
@@ -0,0 +1,5 @@
|
||||
import * as rpkg from 'resolve-pkg';
|
||||
|
||||
const test1 = rpkg('hello');
|
||||
const test2 = rpkg('hello', {});
|
||||
const test3 = rpkg('hello', { cwd: true });
|
||||
@@ -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",
|
||||
"resolve-pkg-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user