Update types for findup-sync

This commit is contained in:
Dimitri Benin
2018-12-06 00:35:08 +01:00
parent bb0258754c
commit 4e8033ef38
4 changed files with 65 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import findup = require('findup-sync');
let str: string;
str = findup('foo');
str = findup(['foo', 'bar']);
str = findup('foo', {
matchBase: true,
});
str = findup('foo', {
cwd: 'c:\\',
});
str = findup('{a,b}*.txt');
str = findup('{a,b}*.txt', { cwd: '/some/path', nocase: true });
+22
View File
@@ -0,0 +1,22 @@
// Type definitions for findup-sync 2.0
// Project: https://github.com/cowboy/node-findup-sync
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Nathan Brown <https://github.com/ngbrown>
// BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import micromatch = require('micromatch');
export = findupSync;
declare function findupSync(
patternOrPatterns: string[] | string,
micromatchOptions?: findupSync.Options
): string;
declare namespace findupSync {
interface Options extends micromatch.Options {
cwd?: string;
}
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"findup-sync-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}