DefinitelyTyped/types/death/death-tests.ts
2019-06-07 18:38:35 -07:00

19 lines
396 B
TypeScript

import ON_DEATH = require("death");
const unsub: () => void = ON_DEATH(
(value: "SIGINT" | "SIGTERM" | "SIGQUIT") => {}
);
const otherUnsub: () => void = ON_DEATH({
debug: true,
uncaughtException: true,
SIGINT: true,
SIGTERM: true,
SIGQUIT: true,
SIGHUP: true
})(
(
value: "uncaughtException" | "SIGINT" | "SIGTERM" | "SIGQUIT" | "SIGHUP"
) => {}
);