Skip to content

Commit

Permalink
chore(internal): fix some types (#1082)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Sep 17, 2024
1 parent 36be724 commit 1ec41a7
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 1ec41a7

Please sign in to comment.