mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #31657 from BendingBender/contains-path
[contains-path] Add types
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import containsPath = require('contains-path');
|
||||
|
||||
containsPath('foo/bar', 'foo'); // $ExpectType boolean
|
||||
containsPath('foo/bar', 'FOO', { nocase: true }); // $ExpectType boolean
|
||||
containsPath('foobar', 'foo', { partialMatch: true }); // $ExpectType boolean
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for contains-path 1.0
|
||||
// Project: https://github.com/jonschlinkert/contains-path
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = containsPath;
|
||||
|
||||
declare function containsPath(
|
||||
filepath: string,
|
||||
substr: string,
|
||||
options?: containsPath.Options
|
||||
): boolean;
|
||||
|
||||
declare namespace containsPath {
|
||||
interface Options {
|
||||
nocase?: boolean;
|
||||
partialMatch?: boolean;
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
"contains-path-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user