@benev/argv
Advanced tools
Comparing version 0.3.5 to 0.3.6
{ | ||
"name": "@benev/argv", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "command line argument parser", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import {Logger} from "./logger.js" | ||
export type OnDeath = (fn: DeathListener) => void | ||
export type OnDeath = (fn: DeathListener) => () => void | ||
export type DeathListener = (exitCode: number) => void | ||
@@ -49,3 +49,6 @@ | ||
const onDeath: OnDeath = listener => rubberneckers.add(listener) | ||
const onDeath: OnDeath = listener => { | ||
rubberneckers.add(listener) | ||
return () => rubberneckers.delete(listener) | ||
} | ||
@@ -52,0 +55,0 @@ return {onDeath} |
import { Logger } from "./logger.js"; | ||
export type OnDeath = (fn: DeathListener) => void; | ||
export type OnDeath = (fn: DeathListener) => () => void; | ||
export type DeathListener = (exitCode: number) => void; | ||
@@ -4,0 +4,0 @@ /** |
@@ -32,5 +32,8 @@ /** | ||
}); | ||
const onDeath = listener => rubberneckers.add(listener); | ||
const onDeath = listener => { | ||
rubberneckers.add(listener); | ||
return () => rubberneckers.delete(listener); | ||
}; | ||
return { onDeath }; | ||
} | ||
//# sourceMappingURL=death-with-dignity.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
229708
4410