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

feat: add a mechanism to retrieve all context (with defaults) #1751

Merged
merged 3 commits into from
Oct 7, 2023

Conversation

pwrmiller
Copy link
Contributor

@pwrmiller pwrmiller commented Jun 16, 2023

Previously, all users of constructs would have to know beforehand the keys in the context to expect, and use either tryGetContext or getContext to retrieve a specific key from context.

This provides a mechanism to get the full context of a node in the construct tree, with overridable defaults.

The getAllContext method allows users to retrieve all context. The interface for getContext and tryGetContext remains unchanged.

I have also fixed a small typo in the library.

@mrgrain
Copy link
Contributor

mrgrain commented Oct 7, 2023

Apologies for the delay @pwrmiller

@mergify mergify bot merged commit 23df709 into aws:10.x Oct 7, 2023
13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants