Skip to main content

IDefinition interface

📖 Description

The IDefinition interface defines a Tripetto form. This so-called form definition contains the complete structure of a form and also holds some meta-information about the form, like the name and language of it. The interface is JSON compatible and can be easily converted to a JSON string with JSON.stringify(). A JSON Schema is available for validation and reference.

This form definition interface is included in both the Tripetto Builder and Tripetto Runner library packages. The interface declaration in those packages is identical. The reason the interface is included in both packages is to avoid importing the Tripetto Builder package into a project that uses the Tripetto Runner library or vice versa.

▶️ Go to the complete reference

caution

Pay attention when importing this interface to avoid bundle bloat. For projects related to the builder, import it from the Tripetto Builder package: import { IDefinition } from "@tripetto/builder". For projects related to runners import it form the Tripetto Runner library: import { IDefinition } from "@tripetto/runner".

📜 JSON Schema

📥 Download JSON Schema

info

The JSON Schema follows the 2020-12 meta-schema.