[has-yarn] Add types

This commit is contained in:
Dimitri Benin
2018-12-15 19:38:16 +01:00
parent 39b514a4bb
commit 60561ecb23
4 changed files with 36 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
import hasYarn = require('has-yarn');
// $ExpectType boolean
hasYarn('foo');
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for has-yarn 1.0
// Project: https://github.com/sindresorhus/has-yarn#readme
// Definitions by: BendingBender <https://github.com/BendgingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = hasYarn;
declare function hasYarn(cwd?: string): boolean;
+23
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",
"has-yarn-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }