import type { HsonSemanticPrimitive } from "../../../../core/types.js"; /** * Coerce a raw token string into a `Primitive` value. * * Rules: * - Trims leading/trailing whitespace. * - If the trimmed string is empty, returns `""`. * - If the value is double-quoted (`"..."`), it is treated as an explicitly * quoted string literal and decoded with `JSON.parse` (so escapes like `\"`, * `\\n`, and `\uXXXX` are honored). Parse failure is treated as a transform error. * - If unquoted, recognizes the keywords `true`, `false`, and `null`. * - If unquoted and numeric (including decimals and scientific notation), returns a `number`. * - Otherwise returns the trimmed string as-is. * * Notes: * - This function does **not** treat single-quoted strings as quoted literals. * - It does **not** recognize `undefined`; unknown identifiers remain strings. * * @param value - Raw input string to coerce. * @returns The coerced `Primitive` value. */ export declare function coerce(value: string): HsonSemanticPrimitive; //# sourceMappingURL=coerce-string.utils.d.ts.map