1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 21:25:25 +00:00

fix(TS error): add void to promise in util

This commit is contained in:
Joe Previte 2021-01-20 11:30:09 -07:00
parent 75717749b2
commit f13ba9401b
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -187,7 +187,7 @@ export const open = async (url: string): Promise<void> => {
url = url.replace(/&/g, "^&")
}
const proc = cp.spawn(command, [...args, url], options)
await new Promise((resolve, reject) => {
await new Promise<void>((resolve, reject) => {
proc.on("error", reject)
proc.on("close", (code) => {
return code !== 0 ? reject(new Error(`Failed to open with code ${code}`)) : resolve()