find-java-home: Provides its own types (#39610)

This commit is contained in:
Alexander T 2019-10-29 06:14:26 +02:00 committed by Jesse Trinity
parent 72e896c558
commit be990a923f
5 changed files with 6 additions and 45 deletions

View File

@ -1182,6 +1182,12 @@
"sourceRepoURL": "https://github.com/sindresorhus/filter-console",
"asOfVersion": "0.1.1"
},
{
"libraryName": "find-java-home",
"typingsPackageName": "find-java-home",
"sourceRepoURL": "https://github.com/jsdevel/node-find-java-home",
"asOfVersion": "1.0.0"
},
{
"libraryName": "find-up",
"typingsPackageName": "find-up",

View File

@ -1,6 +0,0 @@
import findJavaHome = require("find-java-home");
import { promisify } from "util";
findJavaHome(() => { }); // $ExpectType void
findJavaHome({ allowJre: true }, () => { }); // $ExpectType void
promisify(findJavaHome); // $ExpectType (options?: { allowJre?: boolean | undefined; } | undefined) => Promise<string>

View File

@ -1,15 +0,0 @@
// Type definitions for find-java-home 0.2
// Project: https://github.com/jsdevel/node-find-java-home
// Definitions by: sjx233 <https://github.com/sjx233>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare function findJavaHome(callback: (err: Error | undefined, home: string) => void): void;
declare function findJavaHome(options: { allowJre?: boolean }, callback: (err: Error | undefined, home: string) => void): void;
declare namespace findJavaHome {
function __promisify__(options?: { allowJre?: boolean }): Promise<string>;
}
export = findJavaHome;

View File

@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"find-java-home-tests.ts"
]
}

View File

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