layer extension helpers #5

Open
opened 2024-10-30 17:44:03 +00:00 by LizAinslie · 0 comments
LizAinslie commented 2024-10-30 17:44:03 +00:00 (Migrated from github.com)

create a LayerProperty delegate interface and a few OOTB behaviors

default behavior should be lazy. we only want to instantiate values on the scope when we need them

example usages:

// where TLayer : ApplicationLater<TLayer>
var TLayer.var1 by LayerProperty {
  // this block is TLayer.() -> TProperty
  "some variable"
}

var TLayer.someClass by LayerProperty.ServiceLoader<SomeClass> {
  // an optional setup block, running as SomeClass.() -> Unit
}

// etc

i'll add to this as i think of new OOTB behaviors i want to include and will only close the issue after that

create a LayerProperty delegate interface and a few OOTB behaviors default behavior should be lazy. we only want to instantiate values on the scope when we need them example usages: ```kt // where TLayer : ApplicationLater<TLayer> var TLayer.var1 by LayerProperty { // this block is TLayer.() -> TProperty "some variable" } var TLayer.someClass by LayerProperty.ServiceLoader<SomeClass> { // an optional setup block, running as SomeClass.() -> Unit } // etc ``` i'll add to this as i think of new OOTB behaviors i want to include and will only close the issue after that
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
illumi/kraft#5
No description provided.