VDL Plugin SDK

objectType

Import from @varavel/vdl-plugin-sdk/testing.

function objectType(fields): TypeRef;

Creates an inline object TypeRef with the given fields.

Parameters

ParameterTypeDescription
fieldsField[]Inline object fields.

Returns

TypeRef

An object TypeRef.

Example

objectType([field("id", primitiveType("string"))]);
// returns a TypeRef with kind "object"