Skip to main content

QueryParamSerializer

Converts decoded, repeated query values to a source value and back.

Import

import type { QueryParamSerializer } from '@ngblocks/form-nodes/router';

When to use it

Define parsing and serialization between decoded query parameters and source values.

Declaration

type QueryParamSerializer<T> = {
parse(values: readonly string[]): T;
serialize(value: T): readonly string[] | null;
};

Type parameters

ParameterConstraintDefault
TUnconstrainedRequired

Declared members

The declaration above also includes inherited contracts and overloads where applicable.

MemberMeaning
parseParses present values. Throw for malformed input; absence uses the binding default.
serializeReturns decoded values; null removes the key. Angular Router handles URL escaping.