-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a mechanism to retrieve all context (with defaults) (#1751)
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.
- Loading branch information
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters