Question: createEventBuilder validator parameter no longer optional?
brifiction opened this issue · comments
Brian Ng commented
Hello SST Community,
I need help confirming the current function of createEventBuilder
, with a question about it.
Summary
I was upgrading the SST project to latest (beyond 2.39.0) and have noticed the Event Bus createEventBuilder
change, such as below:
import { createEventBuilder, ZodValidator } from "sst/node/event-bus"
const event = createEventBuilder({
bus: "MyBus",
validator: ZodValidator
})
Previously, validator
prop was "optional", but now the function returns TypeError
when validator
is undefined.
Question
Is the validator
prop now required to use createEventBuilder
? If so, great - I'll keep this in mind for future reference.
Just want to confirm if validator
is required now and beyond.
Thanks!
Brian Ng commented