Skip to content

Commit 3c600a0

Browse files
CyberT33NCyberT33N
authored andcommitted
feat: Fixed object type
1 parent 4754067 commit 3c600a0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/errors/CoreError.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { StatusCodes } from 'http-status-codes'
3232
*/
3333
export interface ICoreError extends Error {
3434
error?: Error
35-
data?: object
35+
data?: Record<string, unknown>
3636
httpStatus?: StatusCodes
3737
environment: string
3838
timestamp: string

src/errors/HttpClientError.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import type { AxiosResponseHeaders, AxiosError } from 'axios'
2929
* @property {unknown} responseData - The response data from the server.
3030
* @property {string} errorMessage - The error message returned by Axios.
3131
*/
32-
export interface IAxiosErrorData {
32+
export interface IAxiosErrorData extends Record<string, unknown> {
3333
url: string | undefined
3434
method: string | undefined
3535
payload: unknown

test/unit/src/errors/CoreError.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
*/
3434
export interface ICoreError_Test extends Error {
3535
error?: Error
36-
data?: object
36+
data?: Record<string, unknown>
3737
httpStatus?: StatusCodes
3838
environment: string
3939
timestamp: string

test/unit/src/errors/HttpClientError.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('[TYPE TEST] - src/errors/HttpClientError.ts', () => {
4141
* @property {unknown} responseData - The data received in the response.
4242
* @property {string} errorMessage - A descriptive error message.
4343
*/
44-
interface IAxiosErrorData_Test {
44+
interface IAxiosErrorData_Test extends Record<string, unknown> {
4545
url: string | undefined
4646
method: string | undefined
4747
payload: unknown

0 commit comments

Comments
 (0)