ts_object
FunctionSource
v_1: str = ts_object(value: Any, indent: int = 2, base_indent: int = 0)
Dump a value as json, and put it in a typescript object.
This is a customized Jinja2 template filter.
Arguments
Requires
| Name | Type | Required | |
|---|---|---|---|
value | Any | The value to be filtered. | |
indent | int | The indent of the dumped json. | |
base_indent | int | The indent of the current place. This value needs to be configured when the object is to be put at a value with an existing indent. |
Returns
| Name | Type | |
|---|---|---|
v_1 | str | The rendered multi-line typescript object data. |