A string that might contain stega-encoded data, and is unsafe to compare against string literals
until it's been cleaned with stegaClean().
The type intersects a template literal that has a human readable suffix, with a brand property
that holds the original string type:
The suffix makes TypeScript report "This comparison appears to be unintentional" (TS2367) when
the string is compared to a literal (===, switch cases), and makes it unassignable to
literal unions like 'left' | 'right', while keeping it assignable to string so rendering,
interpolation and string methods keep working. The suffix is a type-level fiction, the runtime
value never ends with that text.
The brand property preserves the original type so stegaClean() can recover it exactly. It's
a string-keyed property rather than a unique symbol so that branded types stay structurally
compatible across duplicated copies of @sanity/client in node_modules. It only exists in
the type system and is never present at runtime.
A string that might contain stega-encoded data, and is unsafe to compare against string literals until it's been cleaned with
stegaClean().The type intersects a template literal that has a human readable suffix, with a brand property that holds the original string type:
===,switchcases), and makes it unassignable to literal unions like'left' | 'right', while keeping it assignable tostringso rendering, interpolation and string methods keep working. The suffix is a type-level fiction, the runtime value never ends with that text.stegaClean()can recover it exactly. It's a string-keyed property rather than aunique symbolso that branded types stay structurally compatible across duplicated copies of@sanity/clientinnode_modules. It only exists in the type system and is never present at runtime.