mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
feat(find-exec): new definition file (#43186)
- definition file for v1.0 - tests https://github.com/shime/find-exec#find-exec Thanks!
This commit is contained in:
parent
2d3a320fd5
commit
d3c19af135
5
types/find-exec/find-exec-tests.ts
Normal file
5
types/find-exec/find-exec-tests.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import findExec = require('find-exec');
|
||||
|
||||
findExec(['mplayer', 'afplay', 'cvlc']); // $ExpectType string | null
|
||||
// support var args as per implementation details
|
||||
findExec('mplayer', 'afplay', 'cvlc'); // ExpectType string | null
|
||||
12
types/find-exec/index.d.ts
vendored
Normal file
12
types/find-exec/index.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Type definitions for find-exec 1.0
|
||||
// Project: https://github.com/shime/find-exec
|
||||
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Takes a list of shell commands and returns the first available.
|
||||
* Works synchronously to respect the order.
|
||||
*/
|
||||
declare function findExec(execs: string[]): string | null;
|
||||
declare function findExec(...args: string[]): string | null;
|
||||
export = findExec;
|
||||
23
types/find-exec/tsconfig.json
Normal file
23
types/find-exec/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"find-exec-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/find-exec/tslint.json
Normal file
1
types/find-exec/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user