Fix problem with jarLaunch type declaration

This commit is contained in:
Kris De Volder
2022-02-17 10:35:36 -08:00
parent a7230ab2ce
commit 68fc3a0d6f
3 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@pivotal-tools/jvm-launch-utils",
"version": "0.0.22",
"version": "0.0.23",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@pivotal-tools/jvm-launch-utils",
"version": "0.0.22",
"version": "0.0.23",
"description": "Provides utilities useful for launching Java processes from node packages.",
"files": [
"src",

View File

@@ -28,7 +28,7 @@ export interface JVM {
/**
* Launch an executable jar with this jvm.
*/
jarLaunch(jar: string, vmargs?: string[], execFileOptions?: ChildProcess.ExecFileOptions, pargs?: [string]) : ChildProcess.ChildProcess
jarLaunch(jar: string, vmargs?: string[], execFileOptions?: ChildProcess.ExecFileOptions, pargs?: string[]) : ChildProcess.ChildProcess
mainClassLaunch(mainClass: string, classpath: string[], jvmArgs: string[], execFileOptions?: ChildProcess.ExecFileOptions): ChildProcess.ChildProcess
}
@@ -185,7 +185,7 @@ class JVMImpl implements JVM {
const str = ChildProcess.execFileSync(javaExecutable, ['--list-modules'], {windowsHide: true, encoding: 'utf8'});
return str.search(/^jdk.management@.*$/m) >= 0;
}
jarLaunch(jar: string, vmargs?: [string], execFileOptions?: ChildProcess.ExecFileOptions, pargs?: [string]): ChildProcess.ChildProcess {
jarLaunch(jar: string, vmargs?: string[], execFileOptions?: ChildProcess.ExecFileOptions, pargs?: string[]): ChildProcess.ChildProcess {
let args = [];
if (vmargs) {
args.push(...vmargs);