parseTrackerSyntax(syntax): Either<RulesError, TrackerDefinition>

Parses the tracker syntax and validates its type and default value.

Parameters

ParameterTypeDescription
syntaxtrackerJSONThe JSON representation of the tracker syntax.

Returns

Either<RulesError, TrackerDefinition>

An object containing the tracker’s name, type, and encoded default value.

Throws

An error if the tracker type or default value is invalid.

Defined in

src/parsing/parser.ts:166