Skip to content

Commit

Permalink
Remove a ts-ignore by using Object.entries
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinLemCode committed Aug 2, 2024
1 parent 9f5feb3 commit 0dd5ac4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as qs from 'qs';
import {
RequestData,
UrlInterpolator,
MultipartRequestData,
RequestArgs,
StripeResourceObject,
RequestData,
RequestHeaders,
MultipartRequestData,
StripeResourceObject,
UrlInterpolator,
} from './Types.js';

const OPTIONS_KEYS = [
Expand Down Expand Up @@ -310,10 +310,7 @@ export function flattenAndStringify(
const result: Record<string, string | Uint8Array> = {};

const step = (obj: MultipartRequestData, prevKey: string | null): void => {
Object.keys(obj).forEach((key) => {
// @ts-ignore
const value = obj[key];

Object.entries(obj).forEach(([key, value]) => {
const newKey = prevKey ? `${prevKey}[${key}]` : key;

if (isObject(value)) {
Expand Down

0 comments on commit 0dd5ac4

Please sign in to comment.