decord/source/utils/LazyAPIPromise.tsx

35 lines
945 B
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 8403
// Function ID: 66814
2026-07-20 16:05:17 +00:00
// Name: useLazyAPIPromise
2026-07-23 10:11:24 +00:00
// Dependencies: [5, 57, 31, 4029, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 8403 (useLazyAPIPromise)
2026-07-23 10:11:24 +00:00
import asyncGeneratorStep from "asyncGeneratorStep";
import _slicedToArray from "_slicedToArray";
import result from "result";
const require = arg1;
const result = require("result").fileFinishedImporting("utils/LazyAPIPromise.tsx");
2026-07-20 16:05:17 +00:00
export default function useLazyAPIPromise(arg0, arg1) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let closure_1 = arg1;
2026-07-20 16:05:17 +00:00
function _execFn() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback(tmp);
return obj(...arguments);
}
const tmp = callback(_execFn.useState(false), 2);
2026-07-23 10:11:24 +00:00
let asyncGeneratorStep = tmp[1];
2026-07-20 16:05:17 +00:00
const tmp2 = callback(_execFn.useState(null), 2);
2026-07-23 10:11:24 +00:00
callback = tmp2[1];
2026-07-20 16:05:17 +00:00
const items = [
function execFn() {
return _execFn(...arguments);
},
{ loading: tmp[0], error: tmp2[0] }
];
return items;
};