mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #31320 from BendingBender/resolve-global
Add types for resolve-global
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for resolve-global 0.1
|
||||
// Project: https://github.com/sindresorhus/resolve-global#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = resolveGlobal;
|
||||
|
||||
declare function resolveGlobal(moduleId: string): string;
|
||||
|
||||
declare namespace resolveGlobal {
|
||||
function silent(moduleId: string): string | null;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import resolveGlobal = require('resolve-global');
|
||||
|
||||
// $ExpectType string
|
||||
resolveGlobal('cat-names');
|
||||
// $ExpectType string | null
|
||||
resolveGlobal.silent('cat-names');
|
||||
@@ -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-global-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user