This commit is contained in:
2025-06-16 10:09:19 +08:00
commit 7a066b3026
428 changed files with 50385 additions and 0 deletions

View File

@ -0,0 +1,22 @@
const PROMISE = Symbol('$$promise')
export default class Fetcher {
get [Symbol.toStringTag]() {
return '[object Fetcher]'
}
constructor() {
this[PROMISE] = new Promise((resolve, reject) => {
this.resolve = resolve
this.reject = reject
})
}
async source() {
return this[PROMISE]
}
async abort() {
;(await this.source())?.abort()
}
}