mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +00:00
fix(common): replace objects type
This commit is contained in:
parent
f8ec4960b7
commit
d05a89b064
@ -48,7 +48,7 @@ export const Options = <T = any>(defaults: any, ...options: any[]): T => {
|
|||||||
* @param target The object to convert.
|
* @param target The object to convert.
|
||||||
* @returns The converted object.
|
* @returns The converted object.
|
||||||
*/
|
*/
|
||||||
export function toSnakeCase<Obj extends Record<string, unknown>>(target: Obj): ObjectToSnake<Obj> {
|
export function toSnakeCase<Obj extends Record<string, any>>(target: Obj): ObjectToSnake<Obj> {
|
||||||
const result = {};
|
const result = {};
|
||||||
for (const [key, value] of Object.entries(target)) {
|
for (const [key, value] of Object.entries(target)) {
|
||||||
switch (typeof value) {
|
switch (typeof value) {
|
||||||
@ -81,7 +81,7 @@ export function toSnakeCase<Obj extends Record<string, unknown>>(target: Obj): O
|
|||||||
* @param target The object to convert.
|
* @param target The object to convert.
|
||||||
* @returns The converted object.
|
* @returns The converted object.
|
||||||
*/
|
*/
|
||||||
export function toCamelCase<Obj extends Record<string, unknown>>(target: Obj): ObjectToLower<Obj> {
|
export function toCamelCase<Obj extends Record<string, any>>(target: Obj): ObjectToLower<Obj> {
|
||||||
const result = {};
|
const result = {};
|
||||||
for (const [key, value] of Object.entries(target)) {
|
for (const [key, value] of Object.entries(target)) {
|
||||||
switch (typeof value) {
|
switch (typeof value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user