- Description:
This key defines which value types do not require root value boundaries when parsing snippet parameters.
The value is an object where each property key is a value type name and each property value is a boolean. When set to
true, that value type does not require root value boundaries. For example, MDX specifies{ string: true }, which allows strings to exist as<Component arg="true" />rather than<Component arg={"true"} />.- Appears in:
└── Snippet Format └── root_value_boundary_optional- Type:
Object<root_value_boundary_optional.*>- Values:
This key represents an individual optional root value boundary configuration in the
root_value_boundary_optionalobject.The value is a boolean that determines whether the root value boundary is optional for a specific parameter name. When set to
true, the boundary tokens are optional for that parameter.Show examplesHide examples
In this example, we have configured root value boundaries to be optional for the
titleparameter.Copied to clipboard_snippets: example: snippet: <<example [[param]]>> params: param: parser: argument options: format: root_value_boundary_optional: title: true{ "_snippets": { "example": { "snippet": "<<example [[param]]>>", "params": { "param": { "parser": "argument", "options": { "format": { "root_value_boundary_optional": { "title": true } } } } } } } }- Examples:
In this example, we have configured root value boundaries to be optional for strings.
Copied to clipboard_snippets: example: snippet: <<example [[param]]>> params: param: parser: argument options: format: root_value_boundary_optional: string: true{ "_snippets": { "example": { "snippet": "<<example [[param]]>>", "params": { "param": { "parser": "argument", "options": { "format": { "root_value_boundary_optional": { "string": true } } } } } } } }