Skip to main content

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

NameTypeRequired
Description
valueAnyThe value to be filtered.
indentintThe indent of the dumped json.
base_indentintThe 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

NameType
Description
v_1strThe rendered multi-line typescript object data.