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

Add typed properties for TypedPropertiesBag #2248

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

hpmellema
Copy link
Contributor

Background

Adds a strongly typed Key to the typed properties bag used by Symbols in codegen. These changes are intended to improve the experience of using Symbol properties in code generators. Usage of these new typed properties would look like:

Property<String> myStringProperty = Property.named("string property"); 

Symbol symbol = Symbol.builder()
                .name("foo")
                .putProperty(myStringProperty, "foo")
                .build()
                
String result = symbol.expectProperty(myStringProperty);

Testing

Added new unit tests


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hpmellema hpmellema requested a review from a team as a code owner April 18, 2024 23:10
@hpmellema hpmellema requested a review from syall April 18, 2024 23:10
@hpmellema hpmellema merged commit d7a37af into smithy-lang:main Apr 19, 2024
13 checks passed
@hpmellema hpmellema deleted the typed-bag branch April 19, 2024 14:18
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.

None yet

2 participants