• Public
  • Public/Protected
  • All

Interface ICommandDefinitionPassOn

Allows you to "pass on" traits from the current definition to all children (assuming they meet the criteria specified). For example, assume you have a "group" that contains a set of children (commands) that all require the same profile type. You can "pass on" the profile attribute/trait from the parent or provide the attribute/trait on the parent that should be passed on to the children (if you do NOT want the trait to apply directly to the parent itself).

Note that "pass on" attributes are accumulated if a child node wishes to pass on additional traits to it's children.


  • ICommandDefinitionPassOn



Optional ignoreNodes

You can ignore nodes with a particular name and type. If name is omitted, then you will ignore all nodes of "type" - and same for if type is omitted.

Optional merge

merge: boolean

If the value is complex and you do NOT want to completely override the child's value, you can indicate merge. For example, you can pass on option definitions (as an array) and "push" the passed on options on the child's options property, rather than completely overwrite any existing options.


property: string

Indicates the property that you wish to "pass on" to all children that meet the criteria (see applyToNodeTypes and ignoreNodesNamed). For example, you can specify "enabledStdin" to set the value of "enableStdin" for all children of the definition.

Optional value

value: any

The value to apply to the property. If the value is omitted, it will take the value from the current node (parent) and pass that on to each child.

Generated using TypeDoc