Skip to content

objectType

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

function objectType(fields): TypeRef;

Creates an inline object TypeRef with the given fields.

Parameters

Parameter Type Description
fields Field[] Inline object fields.

Returns

TypeRef

An object TypeRef.

Example

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