Sets the Temporal implementation to be used by the Agape Temporal namespace.
function setTemporal( temporal: Temporal): voidvoidSets the Temporal implementation to be used by the Agape Temporal namespace.
unknownvoidSets the Temporal implementation to be used by the Agape Temporal namespace.
This function allows you to explicitly configure which Temporal implementation should be used. The provided temporal takes precedence over any Temporal found on globalThis.
import { setTemporal, Temporal } from '@agape/temporal';
import { Temporal as TemporalPolyfill } from '@js-temporal/polyfill';
// Set your preferred polyfill
setTemporal(TemporalPolyfill);
// Now all Temporal namespace usage will use this implementation
const now = Temporal.PlainDateTime.from('2025-09-19T10:00');
console.log(now.toString()); // Uses your polyfill
