Skip to content

Function: unsafeOperation() ​

ts
function unsafeOperation(operation): OperationLiteral;

Defined in: tiny/literals.ts:130

Escape hatch for an operation OperationLiteral cannot express — an overlay with a uuid, a text with arbitrary content, or a directive newer than this package.

Nothing is checked; that is the point. Prefer a creator from /ops when one exists, and reach for this only when the alternative is a cast.

Parameters ​

ParameterType
operationstring

Returns ​

OperationLiteral

Example ​

ts
modifiers('preview', unsafeOperation(`overlay/${uuid}/50%x50%/center`))