Function type that returns the current date/time.
Used internally for timestamping operations. Can be overridden for testing.
Current date/time
Using custom time function for testing
const outbox = createOutboxConsumer({ // ... now: () => new Date('2024-01-15T10:00:00Z') // Fixed time for tests}) Copy
const outbox = createOutboxConsumer({ // ... now: () => new Date('2024-01-15T10:00:00Z') // Fixed time for tests})
Default behavior
const outbox = createOutboxConsumer({ // ... // Defaults to: () => new Date()}) Copy
const outbox = createOutboxConsumer({ // ... // Defaults to: () => new Date()})
Function type that returns the current date/time.
Used internally for timestamping operations. Can be overridden for testing.