Skip to content

Add array_of DI extension macro#348

Merged
Blacksmoke16 merged 5 commits intomasterfrom
config-macro-dsl
Feb 9, 2024
Merged

Add array_of DI extension macro#348
Blacksmoke16 merged 5 commits intomasterfrom
config-macro-dsl

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
@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