-
Notifications
You must be signed in to change notification settings - Fork 538
Open
Description
Bug Report
Description
The documentation at https://es-toolkit.dev/reference/map/keyBy.html lists keyBy under the map category, which implies it should be importable via the es-toolkit/map subpath. However, attempting to do so produces a TypeScript error:
import { keyBy } from "es-toolkit/map";
// Module '"es-toolkit/map"' has no exported member 'keyBy'.ts(2305)Steps to Reproduce
- Install
es-toolkit@1.45.1 - Import
keyByfrom themapsubpath:import { keyBy } from "es-toolkit/map";
- Observe TS error:
Module '"es-toolkit/map"' has no exported member 'keyBy'.ts(2305)
Root Cause
Inspecting dist/map/index.d.ts (and .d.mts) in the published package, keyBy is not re-exported:
export { every } from './every.js';
export { filter } from './filter.js';
export { findKey } from './findKey.js';
export { findValue } from './findValue.js';
export { hasValue } from './hasValue.js';
export { mapKeys } from './mapKeys.js';
export { mapValues } from './mapValues.js';
export { reduce } from './reduce.js';
export { some } from './some.js';
// ← keyBy is missingThere is also no keyBy.d.ts / keyBy.js file under dist/map/.
Environment
es-toolkit version |
1.45.1 |
| Node.js version | v25.8.0 |
| TypeScript | latest |
| Package manager | pnpm |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels