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 array_of DI extension macro #348

Merged
merged 5 commits into from
Feb 9, 2024
Merged

Add array_of DI extension macro #348

merged 5 commits into from
Feb 9, 2024

Conversation

Blacksmoke16
Copy link
Member

Follow up to #332 (comment), I thought about it and realized there's not much benefit in having the dedicated type macros, just to try and construct the type that you could otherwise get directly off the TypeDeclaration.

However, I did see a lot of value in the array_of macro as a means of defining an array of anonymous strictly typed objects. Before you had to do this as an array of a named tuple type, but this had some downsides. Mainly that you are unable to define defaults for the property. As such in order to make a key optional, it had to be nilable.

  • Add array_of macro to ADI::Extension::Schema
  • Remove property?
  • Refactors EXTENSION_SCHEMA_PROPERTIES_MAP to not use TypeDeclaration directly

Switches to a more custom DSL to be more flexible/feature rich
Simplify/re-organize code
Seemingly working implemention of `array_of`
@Blacksmoke16 Blacksmoke16 added component:dependency-injection kind:enhancement New functionality to an existing feature labels Feb 9, 2024
@Blacksmoke16 Blacksmoke16 merged commit fa5a986 into master Feb 9, 2024
8 of 9 checks passed
@Blacksmoke16 Blacksmoke16 deleted the config-macro-dsl branch February 9, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:dependency-injection kind:enhancement New functionality to an existing feature
Development

Successfully merging this pull request may close these issues.

1 participant