decord/source/1504_context.js

29 lines
684 B
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1504
// Function ID: 1505
2026-07-20 16:05:17 +00:00
// Name: context
2026-07-29 08:29:29 +00:00
// Dependencies: [19]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-29 08:29:29 +00:00
// Module 1504 (context)
import importAllResult from "noop";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c0 = importAllResult;
let c1 = "Couldn't find a schedule context.";
2026-07-23 10:11:24 +00:00
let context = importAllResult.createContext({
2026-07-20 16:05:17 +00:00
scheduleUpdate(arg0) {
2026-07-29 08:29:29 +00:00
const error = new Error(c1);
2026-07-20 16:05:17 +00:00
throw error;
},
flushUpdates() {
2026-07-29 08:29:29 +00:00
const error = new Error(c1);
2026-07-20 16:05:17 +00:00
throw error;
}
});
export default function useScheduleUpdate(arg0) {
2026-07-23 10:11:24 +00:00
context = importAllResult.useContext(context);
2026-07-20 16:05:17 +00:00
context.scheduleUpdate(arg0);
const effect = importAllResult.useEffect(context.flushUpdates);
};
export const ScheduleUpdateContext = context;