mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 19:09:18 +08:00
Add to-absolute-glob (#22575)
* Add to-absolute-glob * Use ImportEquals instead of namespace import
This commit is contained in:
committed by
Mohamed Hegazy
parent
94e069c099
commit
02bb19992f
13
types/to-absolute-glob/index.d.ts
vendored
Normal file
13
types/to-absolute-glob/index.d.ts
vendored
Normal 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;
|
||||
6
types/to-absolute-glob/to-absolute-glob-tests.ts
Normal file
6
types/to-absolute-glob/to-absolute-glob-tests.ts
Normal 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'});
|
||||
23
types/to-absolute-glob/tsconfig.json
Normal file
23
types/to-absolute-glob/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
1
types/to-absolute-glob/tslint.json
Normal file
1
types/to-absolute-glob/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user