+16
index.js
+16
index.js
···
24
24
},
25
25
};
26
26
27
+
//copied from https://github.com/bluesky-social/atproto/issues/4477, thank you <3
28
+
AbortSignal.timeout = function (ms) {
29
+
const controller = new AbortController();
30
+
31
+
setTimeout(() => {
32
+
controller.abort(new Error(`signal timed out after ${ms} ms`));
33
+
}, ms);
34
+
35
+
return controller.signal;
36
+
};
37
+
AbortSignal.prototype.throwIfAborted = function () {
38
+
const { aborted, reason = "Aborted" } = this;
39
+
if (!aborted) return;
40
+
throw reason;
41
+
};
42
+
27
43
import "expo-router/entry";