CursorCodecOptionsSync
type CursorCodecOptionsSync<T> = object;Defined in: cursor-codec.ts:34
The codec pipeline is two independently pluggable stages
(signature-compatible with drizzle-cursor’s options, so the same
overrides can be shared between both libraries):
data ──serializer──▶ string ──encoder──▶ tokendata ◀───parser───── string ◀──decoder── tokenAll-sync stages variant — produces a fully synchronous CursorCodec.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
Record<string, unknown> |
Properties
Section titled “Properties”decoder?
Section titled “decoder?”decoder?: (token) => string;Defined in: cursor-codec.ts:42
Reverses encoder. Default: base64url decode.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
token |
string |
Returns
Section titled “Returns”string
encoder?
Section titled “encoder?”encoder?: (str) => string;Defined in: cursor-codec.ts:40
Makes the serialized string opaque/transport-safe. Default: base64url.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
str |
string |
Returns
Section titled “Returns”string
parser?
Section titled “parser?”parser?: (raw) => T;Defined in: cursor-codec.ts:38
Converts a string back to cursor data. Default: JSON.parse.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
raw |
string |
Returns
Section titled “Returns”T
reviveDates?
Section titled “reviveDates?”reviveDates?: boolean;Defined in: cursor-codec.ts:47
Revive top-level ISO-8601 date/datetime strings into Date objects on
decode (matching drizzle-cursor’s parse behavior). Default: true.
serializer?
Section titled “serializer?”serializer?: (data) => string;Defined in: cursor-codec.ts:36
Converts cursor data to a string. Default: JSON.stringify.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
T |
Returns
Section titled “Returns”string