Reusing R.Remap type#2860
Conversation
WalkthroughThis change removes the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ZodObject
participant Ramda
User->>ZodObject: Call remap(mapping)
ZodObject->>Ramda: Use R.Remap to remap keys
ZodObject->>ZodObject: Apply Intact to preserve keys
ZodObject-->>User: Return new ZodObject with remapped and intact keys
Estimated code review effort🎯 2 (Simple) | ⏱️ ~6 minutes Possibly related PRs
Suggested labels
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🧰 Additional context used🧠 Learnings (13)📓 Common learnings📚 Learning: in express-zod-api, when migrating from zod v3 to v4, the correct approach for internal type imports...Applied to files:
📚 Learning: the type-only import `import type {} from "qs";` in express-zod-api/src/index.ts is necessary to avo...Applied to files:
📚 Learning: in express-zod-api tsup configurations, the direct mutation of `options.supported` in the `esbuildop...Applied to files:
📚 Learning: ramda is correctly listed as a dependency in express-zod-api/package.json, so imports of ramda utili...Applied to files:
📚 Learning: zod version 3.25.0 and later expose the zod v4 api through the special import paths "zod/v4" and "zo...Applied to files:
📚 Learning: in express-zod-api, when working with zod's json schema override callbacks, using `delete` to mutate...Applied to files:
📚 Learning: in express-zod-api's `flattenio` function in json-schema-helpers.ts, the `additionalproperties` fiel...Applied to files:
📚 Learning: the jsonschema type is not exported from the main "zod" module and must be imported from "zod/v4/cor...Applied to files:
📚 Learning: the `./example` directory in the express-zod-api repository contains demonstration code for educatio...Applied to files:
📚 Learning: the `_zod` property in zod v4 schemas is officially documented and recommended for library authors t...Applied to files:
📚 Learning: the base type `object & { [symbol.iterator]?: never }` in express-zod-api correctly excludes arrays ...Applied to files:
📚 Learning: in typescript libraries with generic constraints, when providing default values for generic paramete...Applied to files:
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| ): z.ZodPipe< | ||
| z.ZodPipe<this, z.ZodTransform>, // internal type simplified | ||
| z.ZodObject<Remap<Shape, U, V> & Intact<Shape, U>, Config> | ||
| z.ZodObject<R.Remap<Shape, U> & Intact<Shape, U>, Config> |
There was a problem hiding this comment.
check if it's actually exposed/resolved into the build
There was a problem hiding this comment.
it's not. but there is an option in tsup: dts.resolve, however, it's not documented how exactly it works (it does not)
|
ok, this might require to include |
|
I think I found the reason:
|
|
Perhaps it would be better to get back to it if I decide to detach the plugin. |
I suggested this type to Ramda maintainers for
R.renameKeys()methodSummary by CodeRabbit