Skip to content

Feature: Lazy Evaluation Ergonomics #46

@Goldziher

Description

@Goldziher

Focused Scope

Improve lazy-evaluation ergonomics and documentation around the existing use() API.

Proposed v1

  • Document use(async () => ...) with buildAsync().
  • Add tests showing async use() resolves through buildAsync().
  • Ensure sync build() fails clearly when async lazy values are used.
  • Optionally add lazy as an alias for use if the naming improvement is worth the public API surface.

Out of Scope

  • Field dependency graphs.
  • lazyIf() or conditional DSLs.
  • New relationship/association semantics.

Conditional values can already be expressed in the factory function through kwargs and hooks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions