mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
fix: delay ObjectURL revocation and silence TS5 baseUrl deprecations (#1181)
- Delay URL.revokeObjectURL() from 0ms to 1000ms in useFrameCapture so the browser has time to initiate the download before the blob is freed. A 0ms timeout fires synchronously after the current microtask queue, before the browser's download machinery reads the URL. - Add ignoreDeprecations: '5.0' to cli and studio tsconfigs to silence TypeScript baseUrl/paths deprecation warnings without changing behavior. Co-authored-by: Jefsky Wong <jefsky@qq.com>
This commit is contained in:
co-authored by
Jefsky Wong
parent
1abe69f3e4
commit
6de6ea5349
@@ -14,7 +14,8 @@
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"outDir": "./dist",
|
||||
"declaration": true
|
||||
"declaration": true,
|
||||
"ignoreDeprecations": "5.0"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
|
||||
@@ -69,7 +69,7 @@ export function useFrameCapture({
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
link.remove();
|
||||
setTimeout(() => URL.revokeObjectURL(blobUrl), 0);
|
||||
setTimeout(() => URL.revokeObjectURL(blobUrl), 1000);
|
||||
} catch (fetchErr) {
|
||||
clearTimeout(timeout);
|
||||
if (fetchErr instanceof DOMException && fetchErr.name === "AbortError") {
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
"noEmit": true,
|
||||
"incremental": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true
|
||||
"isolatedModules": true,
|
||||
"ignoreDeprecations": "5.0"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["dist", "node_modules", "src/**/*.test.ts"]
|
||||
|
||||
Reference in New Issue
Block a user