-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hello,
I'm totally able to use functions in KCL and this is awesome. But it would be nice to have syntax support for this:
schema Config:
mixin [
AppIdMixin
]
[...str]: any
team: str
teamName?: str
cluster?: str
project?: str
env?: str
baseId?: str
appId?: any
protocol AppIdProtocol:
team: str
project?: str
env?: str
mixin AppIdMixin for AppIdProtocol:
baseId = "-".join([e for e in [team, project, env] if e])
appId = lambda name: str -> str {
"${baseId}-${name}"
}
Functions are operational, though I'm not sure with how many positional arguments, one argument works at least...
To achieve this scenario a workaround setting type to any appId?: any
is required, it would great to have ability to support this with some native syntax... WDYT @Peefy ?
Thank you very much!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request