I get this typescript error when exactOptionalPropertyTypes is true in my tsconfig
Argument of type '{ encode: (value: string[]) => string; decode: (value: string | null) => string[] | null; defaultValue: string[] | undefined; }' is not assignable to parameter of type 'EncodeAndDecodeOptions<string[]>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'defaultValue' are incompatible.
Type 'string[] | undefined' is not assignable to type 'string[]'.
Type 'undefined' is not assignable to type 'string[]'.ts(2379)
Describe the bug
Given this code:
const booleanFilters = queryParam('bf', ssp.array<string>([]));
I get this typescript error when
exactOptionalPropertyTypes
is true in my tsconfigReproduction
Logs
No response