diff --git a/types/to-absolute-glob/index.d.ts b/types/to-absolute-glob/index.d.ts new file mode 100644 index 0000000000..1042bbace7 --- /dev/null +++ b/types/to-absolute-glob/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for to-absolute-glob 2.0 +// Project: https://github.com/jonschlinkert/to-absolute-glob +// Definitions by: Klaus Meinhardt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function toAbsoluteGlob(pattern: string, options?: toAbsoluteGlob.Options): string; +declare namespace toAbsoluteGlob { + interface Options { + cwd?: string; + root?: string; + } +} +export = toAbsoluteGlob; diff --git a/types/to-absolute-glob/to-absolute-glob-tests.ts b/types/to-absolute-glob/to-absolute-glob-tests.ts new file mode 100644 index 0000000000..51c9afde48 --- /dev/null +++ b/types/to-absolute-glob/to-absolute-glob-tests.ts @@ -0,0 +1,6 @@ +import toAbsoluteGlob = require('to-absolute-glob'); + +let result: string = toAbsoluteGlob('foo.*'); +result = toAbsoluteGlob('/foo.*', {root: '/bar'}); +result = toAbsoluteGlob('foo.*', {cwd: '/bar'}); +result = toAbsoluteGlob('foo.*', {cwd: '/bar', root: '/bar'}); diff --git a/types/to-absolute-glob/tsconfig.json b/types/to-absolute-glob/tsconfig.json new file mode 100644 index 0000000000..a143fec271 --- /dev/null +++ b/types/to-absolute-glob/tsconfig.json @@ -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", + "to-absolute-glob-tests.ts" + ] +} diff --git a/types/to-absolute-glob/tslint.json b/types/to-absolute-glob/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/to-absolute-glob/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }