Skip to content

Conversation

Haroenv
Copy link

@Haroenv Haroenv commented Oct 2, 2025

fixes #18

I checked and origin is allowed to be undefined according to the code @raphi

@raphi
Copy link
Member

raphi commented Oct 2, 2025

Haroeeeeeenn 🫶

Hmm origin is the original object returned by the API, and we need it in order to find which record you want to patch (since we don't share the unstable record ID). See the API documentation for more infos.

#18 suggests a reorder of parameters, would that work?

@Haroenv
Copy link
Author

Haroenv commented Oct 3, 2025

👋 👋

Aren't you checking here that the origin is undefined and adding a fallback?

typeof origin === 'undefined'
? { record: update }
: {
origin,
update,
};

You could change the order of the arguments, but that's a breaking change, and you'd have to change them in the JS as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript Error (TS1016): Invalid Parameter Order in placekit.d.ts (Required Param After Optional Param)
2 participants