Skip to content

stringLiteral

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

function stringLiteral(value): LiteralValue;

Creates a string LiteralValue.

Parameters

Parameter Type Description
value string String content to store.

Returns

LiteralValue

A string literal node.

Example

stringLiteral("hello");
// returns a LiteralValue with kind "string"