Skip to content

Wrapped Data Types #180

@t-ober

Description

@t-ober

First of all thanks for your work regarding this useful project 🙂

I'm wondering if there is a way to define a data type that uses a different data type as one if its parameters.

e.g.:

#@define
TypeA {
    fizz: String
    buzz: String
}

#@define
TypeB = {
    foo: TypeA
    bar: TypeA
}

cfg {
    typeB = TypeB
    additionalParam = String
}

Currently TypeB gets interpreted as :

  final case class TypeB(
    bar : java.lang.String,
    foo : java.lang.String
  )

This would be super helpful to avoid code duplication and make configuration data handling much easier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions