fix(common): replace objects type

This commit is contained in:
socram03 2023-06-17 00:48:42 +00:00
parent f8ec4960b7
commit d05a89b064

View File

@ -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) {