Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing Promise return type on shutdown #245

Closed
Viper-Bit opened this issue Apr 6, 2024 · 1 comment
Closed

missing Promise return type on shutdown #245

Viper-Bit opened this issue Apr 6, 2024 · 1 comment

Comments

@Viper-Bit
Copy link
Contributor

shutdown return type in ts must be Promise<boolean> instead of boolean

/**
* Performs a graceful shutdown of the server and closes the listen socket once all pending requests have been completed.
*
* @param {uWebSockets.us_listen_socket=} [listen_socket] Optional
* @returns {Promise<Boolean>}
*/
shutdown(listen_socket?: uWebsockets.us_listen_socket): boolean;

typescript complain about using await on it:
Unexpected `await` of a non-Promise (non-"Thenable") value.

@kartikk221
Copy link
Owner

Hey, this has been merged and pushed in the recent v6.15.2 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants