porsager / prexit

A graceful way to shutdown / handle process exit
Do What The F*ck You Want To Public License
116 stars 7 forks source link

Typescript types are incorrect #9

Closed guseggert closed 2 months ago

guseggert commented 2 months ago

Hi, thanks for the library!

Some of the TS types appear to be incorrect:

import prexit, { exit } from "prexit";
...
prexit(async () => ...);
exit(0);

That compiles but results in:

TypeError: (0 , import_prexit.exit) is not a function

The following fails compilation but works at runtime:

prexit.exit(0);

I won't be able to fix this, but just letting you know. Thanks!