Hey folks, I'm using yours lib to fix some third pattern response and types.
The third lib returned me an interface called Places
, for example, import type { Places } from "@duffel/api/Places/Suggestions/SuggestionsType";
And I'm using like this:
export type SearchPlacesData = CamelCaseKeys<Places, true>;
export const searchPlaces = async (query: string) => {
const data = (
await duffel.suggestions.list({
query,
})
).data;
const formattedData = camelcaseKeys<Places[]>(data, { deep: true });
return formattedData;
};
but when I try to update from v8.0.2 to v9.0.0 I get this error (it's working on 8.0.2):
Type 'Places' does not satisfy the constraint 'readonly any[] | ObjectOptional'.
Which can be reproduced here:
and also, on the return it's not showing the correct fields.
before:
after:
How I can fix this?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too