Join Slack
Powered by
Is it considered good practice to create resources...
# typescript
c
cuddly-smartphone-89735
01/22/2020, 3:33 PM
Is it considered good practice to create resources within a class instead of just defining them top-level in a file? Would that be a special kind of class (inherit from something?) or just a plain regular typescript class?
t
tall-librarian-49374
01/22/2020, 3:45 PM
It depends… If you have reusable bits, wrap them into components
https://www.pulumi.com/docs/intro/concepts/programming-model/#components
Otherwise, split it into files as you see fit, keep related resources close to each other and unrelated separate.
c
cuddly-smartphone-89735
01/22/2020, 4:04 PM
Interesting. I will dive into that by trying it out. 🙂
Open in Slack
Previous
Next