decord/source/1480_context.js

27 lines
681 B
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1480
2026-07-25 08:10:48 +00:00
// Function ID: 17183
2026-07-20 16:05:17 +00:00
// Name: context
2026-07-23 10:11:24 +00:00
// Dependencies: [31]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 1480 (context)
2026-07-23 10:11:24 +00:00
import importAllResult from "result";
let context = importAllResult.createContext({
2026-07-20 16:05:17 +00:00
scheduleUpdate(arg0) {
const error = new Error("Couldn't find a schedule context.");
throw error;
},
flushUpdates() {
const error = new Error("Couldn't find a schedule context.");
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;