Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
isHttpMethod,
} from './utils.js';

abstract class BaseRouter {
class Router {
protected context: Record<string, unknown>;

protected readonly routeRegistry: RouteHandlerRegistry;
Expand All @@ -57,7 +57,7 @@ abstract class BaseRouter {
*/
protected readonly isDev: boolean = false;

protected constructor(options?: RouterOptions) {
public constructor(options?: RouterOptions) {
this.context = {};
const alcLogLevel = getStringFromEnv({
key: 'AWS_LAMBDA_LOG_LEVEL',
Expand Down Expand Up @@ -515,4 +515,4 @@ abstract class BaseRouter {
}
}

export { BaseRouter };
export { Router };
4 changes: 2 additions & 2 deletions packages/event-handler/src/types/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type {
JSONObject,
} from '@aws-lambda-powertools/commons/types';
import type { APIGatewayProxyEvent, Context } from 'aws-lambda';
import type { BaseRouter } from '../rest/BaseRouter.js';
import type { HttpErrorCodes, HttpVerbs } from '../rest/constants.js';
import type { Route } from '../rest/Route.js';
import type { Router } from '../rest/Router.js';
import type { ResolveOptions } from './common.js';

type ErrorResponse = {
Expand Down Expand Up @@ -34,7 +34,7 @@ interface ErrorConstructor<T extends Error = Error> {
}

/**
* Options for the {@link BaseRouter} class
* Options for the {@link Router} class
*/
type RouterOptions = {
/**
Expand Down
Loading
Loading