Closed dshatokhin closed 1 hour ago
The output
property is a special property on Module
, and can only be used to describe the module's output.
To get around this, you'll need to define a class with output
as a property, then set your module's output to a value of that class.
class Foo {
output: Output
}
class Output {
key: String
}
foo: Foo = new {
output {
key = "foo"
}
}
output {
value = foo
}
This produces:
output {
key = "foo"
}
@bioball , thanks for such a quick reply, I will then use the workaround you suggested
I'm generating a
json
output for the object with key nameoutput
but even if I enclose it in backtickspkl
throws an error:I'm expecting it to work as any other keywords such as
class
,module
,string
etc:Version used
Pkl 0.26.3
onamd64
Linux machine