From c41f3643344e7963f3c7351543f527ec3d7e23a6 Mon Sep 17 00:00:00 2001 From: Gdm0714 Date: Tue, 17 Mar 2026 11:31:32 +0900 Subject: [PATCH] feat(object): export ToCamelCaseKeys and ToSnakeCaseKeys types Export utility types so users can reference them directly instead of using ReturnType. Closes #1624 --- src/object/index.ts | 2 ++ src/object/toCamelCaseKeys.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/object/index.ts b/src/object/index.ts index 1c75c7bdf..b06bf27f9 100644 --- a/src/object/index.ts +++ b/src/object/index.ts @@ -13,5 +13,7 @@ export { omitBy } from './omitBy.ts'; export { pick } from './pick.ts'; export { pickBy } from './pickBy.ts'; export { toCamelCaseKeys } from './toCamelCaseKeys.ts'; +export type { ToCamelCaseKeys } from './toCamelCaseKeys.ts'; export { toMerged } from './toMerged.ts'; export { toSnakeCaseKeys } from './toSnakeCaseKeys.ts'; +export type { ToSnakeCaseKeys } from './toSnakeCaseKeys.ts'; diff --git a/src/object/toCamelCaseKeys.ts b/src/object/toCamelCaseKeys.ts index 56079cb31..de18498dd 100644 --- a/src/object/toCamelCaseKeys.ts +++ b/src/object/toCamelCaseKeys.ts @@ -40,7 +40,7 @@ type NonPlainObject = | ((...args: any[]) => any) | typeof globalThis; -type ToCamelCaseKeys = T extends NonPlainObject +export type ToCamelCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array>