https://serverless-stack.com/ logo
#help
Title
# help
d

Daniel Gato

02/09/2022, 1:12 PM
Is there a version for the guide in typescript? I have issues to convert handler.js to typescript (as it can handle multiple different events)
t

thdxr

02/09/2022, 1:28 PM
This probably is more a typescript thing than an sst thing
You need to use something called a type union
EventTypeA | EventTypeB
Generally though I advise against having one handler do multiple things
d

Daniel Gato

02/09/2022, 1:51 PM
Generally though I advise against having one handler do multiple things
The guide says the opposite. But I understand what you are trying to say. I will remove the handler.js from code base. Thanks