Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typos in comments #16

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/defineNitroTRPCEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const defineNitroTRPCEventHandler: NitroRequestHandler = <TRouter extends
// Create a URL object from the request URL:
const url = createURL(request.url!)

// Obtain the URL query paramaters:
// Obtain the URL query parameters:
const query = url.searchParams

// Obtain the URL path:
Expand Down Expand Up @@ -139,7 +139,7 @@ export const defineNitroTRPCEventHandler: NitroRequestHandler = <TRouter extends
}
})

// Set the statis code accordingly:
// Set the status code accordingly:
setResponseStatus(event, status)

// Merge response headers accordingly:
Expand Down
8 changes: 4 additions & 4 deletions src/internals/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export const getPath = (event: H3Event): string => {
const params = event.context.params

if (!params) {
// Throw an error if the trpc paramater is not a string or an array:
// Throw an error if the trpc parameter is not a string or an array:
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message:
'Please ensure that the trpc paramater is defined in your routes file e.g., ./routes/[trpc].ts',
'Please ensure that the trpc parameter is defined in your routes file e.g., ./routes/[trpc].ts',
cause: 'Nitro Routing Configuration'
})
}
Expand All @@ -33,11 +33,11 @@ export const getPath = (event: H3Event): string => {
return params.trpc
}

// Throw an error if the trpc paramater is not a string or an array:
// Throw an error if the trpc parameter is not a string or an array:
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message:
'Please ensure that the trpc paramater is defined in your routes file e.g., ./routes/[trpc].ts',
'Please ensure that the trpc parameter is defined in your routes file e.g., ./routes/[trpc].ts',
cause: 'Nitro Routing Configuration'
})
}
Expand Down
Loading