chore(): start moving some packages to the core directory (#7215)

This commit is contained in:
Adrien de Peretti
2024-05-03 13:37:41 +02:00
committed by GitHub
parent fdee748eed
commit bbccd6481d
1436 changed files with 275 additions and 756 deletions

View File

@@ -0,0 +1,16 @@
import ProcessManager from "./process-manager.js"
export default (processManager: ProcessManager) => {
const abortController = new AbortController()
processManager.onTerminated(() => abortController.abort())
return abortController
}
export const isAbortError = (e: any) =>
e !== null && "code" in e && e.code === "ABORT_ERR"
export const getAbortError = () => {
return {
code: "ABORT_ERR",
}
}