Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/internal/qs/stringify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function inner_stringify(
strictNullHandling,
skipNulls,
encodeDotInKeys,
// @ts-expect-error
// @ts-ignore
generateArrayPrefix === 'comma' && encodeValuesOnly && is_array(obj) ? null : encoder,
filter,
sort,
Expand All @@ -224,7 +224,7 @@ function inner_stringify(

function normalize_stringify_options(
opts: StringifyOptions = defaults,
): NonNullableProperties<StringifyOptions> {
): NonNullableProperties<Omit<StringifyOptions, 'indices'>> & { indices?: boolean } {
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
}
Expand Down Expand Up @@ -299,7 +299,7 @@ function normalize_stringify_options(
formatter: formatter,
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
// @ts-expect-error
// @ts-ignore
sort: typeof opts.sort === 'function' ? opts.sort : null,
strictNullHandling:
typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,
Expand Down