diff --git a/types/has-yarn/has-yarn-tests.ts b/types/has-yarn/has-yarn-tests.ts new file mode 100644 index 0000000000..925cfe3c43 --- /dev/null +++ b/types/has-yarn/has-yarn-tests.ts @@ -0,0 +1,4 @@ +import hasYarn = require('has-yarn'); + +// $ExpectType boolean +hasYarn('foo'); diff --git a/types/has-yarn/index.d.ts b/types/has-yarn/index.d.ts new file mode 100644 index 0000000000..378f1ee811 --- /dev/null +++ b/types/has-yarn/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for has-yarn 1.0 +// Project: https://github.com/sindresorhus/has-yarn#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = hasYarn; + +declare function hasYarn(cwd?: string): boolean; diff --git a/types/has-yarn/tsconfig.json b/types/has-yarn/tsconfig.json new file mode 100644 index 0000000000..824092017a --- /dev/null +++ b/types/has-yarn/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", + "has-yarn-tests.ts" + ] +} diff --git a/types/has-yarn/tslint.json b/types/has-yarn/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/has-yarn/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }