mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for junk 2.1
|
||||
// Project: https://github.com/sindresorhus/junk#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Returns `true` if `filename` matches a junk file.
|
||||
*/
|
||||
export function is(filename: string): boolean;
|
||||
/**
|
||||
* Returns `true` if `filename` doesn't match a junk file.
|
||||
*/
|
||||
export function not(filename: string): boolean;
|
||||
/**
|
||||
* Regex used for matching.
|
||||
*/
|
||||
export const regex: RegExp;
|
||||
@@ -0,0 +1,12 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import fs = require('fs');
|
||||
import * as junk from 'junk';
|
||||
|
||||
junk.is('foo'); // $ExpectType boolean
|
||||
junk.not('foo'); // $ExpectType boolean
|
||||
junk.regex; // $ExpectType RegExp
|
||||
|
||||
fs.readdir('some/path', (err, files) => {
|
||||
files.filter(junk.not);
|
||||
});
|
||||
@@ -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",
|
||||
"junk-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user