Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async code in constructor #888

Open
shishkin opened this issue Feb 10, 2022 · 2 comments
Open

Async code in constructor #888

shishkin opened this issue Feb 10, 2022 · 2 comments

Comments

@shishkin
Copy link

Hi! How can I execute async code in construct's constructor? Javascript/Typescript constructors disallow await. I would like to have an async build step before passing results onto sub-constructs.

@Chriscbr
Copy link
Contributor

Unfortunately we do not generally support this kind of use case. Please see our guidance here: aws/aws-cdk#8273 (comment)

@shishkin
Copy link
Author

Thanks for the pointer @Chriscbr, even though I totally disagree with that comment's reasoning as a few others did in that thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants