Skip to content

Commit b0b89f9

Browse files
committed
Refactor response exports and function declarations
Added an index file to centralize exports for response utilities. Updated invalidParameterType and responseBuilder to use named exports instead of default exports for consistency and improved import clarity.
1 parent fc0af20 commit b0b89f9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/response/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { invalidParameterType } from './invalid_parameter_type.ts'
2+
export { responseBuilder } from './response_builder.ts'

src/response/invalid_parameter_type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import responseBuilder from './response_builder.ts';
1+
import { responseBuilder } from './response_builder.ts';
22

3-
export default function InvalidParameterType(
3+
export function invalidParameterType(
44
parameter : string,
55
type : string
66
) : Response {

src/response/response_builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function responseBuilder(
1+
export function responseBuilder(
22
success : boolean,
33
result : unknown,
44
errors : {type : string, message : string}[]

0 commit comments

Comments
 (0)