mirror of https://git.tuxpa.in/a/code-server.git
fix(TS error): add void to promise in util
This commit is contained in:
parent
75717749b2
commit
f13ba9401b
|
@ -187,7 +187,7 @@ export const open = async (url: string): Promise<void> => {
|
||||||
url = url.replace(/&/g, "^&")
|
url = url.replace(/&/g, "^&")
|
||||||
}
|
}
|
||||||
const proc = cp.spawn(command, [...args, url], options)
|
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("error", reject)
|
||||||
proc.on("close", (code) => {
|
proc.on("close", (code) => {
|
||||||
return code !== 0 ? reject(new Error(`Failed to open with code ${code}`)) : resolve()
|
return code !== 0 ? reject(new Error(`Failed to open with code ${code}`)) : resolve()
|
||||||
|
|
Loading…
Reference in New Issue