erquhart
erquhart11mo ago

Support ES2023 immutable Array methods in Convex runtime

ES2023 introduced non-mutating versions of array methods like .reverse() and .splice() (.toReversed() and .toSpliced() respectively. Supported in Node 20 and current browsers.
5 Replies
ballingt
ballingt11mo ago
They're already supported!
No description
ballingt
ballingt11mo ago
(although point taken, we do need to update the TypeScript types) and we can update the TypeScript types used in the default convex/tsconfig.json of a new project
erquhart
erquhartOP11mo ago
Typescript didn't yell at me actually, it was runtime - I must need to update convex
ballingt
ballingt11mo ago
oh hm Which method was it? Updating convex client version shouldn't make a difference here. also curious if it was Node, an action, or a mutation/query I belive Node actions run on Node 18 currently
erquhart
erquhartOP11mo ago
It's a mutation in the convex runtime, toSpliced() oh shoot nvm it's optimistic update code, this is a react native issue 🤦‍♂️

Did you find this page helpful?