mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 08:09:17 +02:00
fdc501a35c
CLI commands also added: `pkl format check` and `pkl format apply`.
24 lines
408 B
Plaintext
Vendored
24 lines
408 B
Plaintext
Vendored
import "foo.pkl"
|
|
|
|
bar = new Listing<Int>(!isEmpty) { 1; 2 } //a bar
|
|
|
|
typealias Typealias = (String, Int) -> Boolean
|
|
|
|
/// a baz
|
|
/// returns its parameter
|
|
baz = (x, y, z) -> x + y + z
|
|
|
|
function fun(x: Int?, b: Boolean) = if (b) /***return x**/ x else x + bar[0]
|
|
|
|
prop = trace(1) + super.foo + module.foo
|
|
|
|
prop2 {
|
|
for (x in List(1)) {
|
|
when (x == 1) {
|
|
x
|
|
}
|
|
}
|
|
}
|
|
|
|
choices: "foo" | *"bar" | String
|