mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-07 17:28:53 +00:00
OpenTUI is here (#2685)
This commit is contained in:
12
packages/opencode/src/util/signal.ts
Normal file
12
packages/opencode/src/util/signal.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export function signal() {
|
||||
let resolve: any
|
||||
const promise = new Promise((r) => (resolve = r))
|
||||
return {
|
||||
trigger() {
|
||||
return resolve()
|
||||
},
|
||||
wait() {
|
||||
return promise
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user