Add to-absolute-glob (#22575)

* Add to-absolute-glob

* Use ImportEquals instead of namespace import
This commit is contained in:
Klaus Meinhardt
2018-01-02 20:17:04 +01:00
committed by Mohamed Hegazy
parent 94e069c099
commit 02bb19992f
4 changed files with 43 additions and 0 deletions

13
types/to-absolute-glob/index.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
// Type definitions for to-absolute-glob 2.0
// Project: https://github.com/jonschlinkert/to-absolute-glob
// Definitions by: Klaus Meinhardt <https://github.com/ajafff>
// 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;

View File

@@ -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'});

View File

@@ -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"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }