Skip to content

floatLiteral

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

function floatLiteral(value): LiteralValue;

Creates a float LiteralValue.

Parameters

Parameter Type Description
value number Floating-point value to store.

Returns

LiteralValue

A float literal node.

Example

floatLiteral(3.14);
// returns a LiteralValue with kind "float"