diff --git a/src/planning/planner.ts b/src/planning/planner.ts index c995f6180..00c241358 100644 --- a/src/planning/planner.ts +++ b/src/planning/planner.ts @@ -3,7 +3,7 @@ import * as ERROR_MSGS from '../constants/error_msgs'; import { BindingTypeEnum, TargetTypeEnum } from '../constants/literal_types'; import * as METADATA_KEY from '../constants/metadata_keys'; import { interfaces } from '../interfaces/interfaces'; -import { isStackOverflowExeption } from '../utils/exceptions'; +import { isStackOverflowException } from '../utils/exceptions'; import { circularDependencyToException, getServiceIdentifierAsString, listMetadataForTarget, listRegisteredBindingsForServiceIdentifier } from '../utils/serialization'; import { Context } from './context'; import { Metadata } from './metadata'; @@ -236,7 +236,7 @@ function plan( return context; } catch (error) { if ( - isStackOverflowExeption(error) + isStackOverflowException(error) ) { circularDependencyToException(context.plan.rootRequest); } diff --git a/src/utils/exceptions.ts b/src/utils/exceptions.ts index 4f246ffdf..8f68d5f72 100644 --- a/src/utils/exceptions.ts +++ b/src/utils/exceptions.ts @@ -1,6 +1,6 @@ import * as ERROR_MSGS from '../constants/error_msgs'; -export function isStackOverflowExeption(error: unknown): error is RangeError { +export function isStackOverflowException(error: unknown): error is RangeError { return ( error instanceof RangeError || (error as Error).message === ERROR_MSGS.STACK_OVERFLOW @@ -11,7 +11,7 @@ export const tryAndThrowErrorIfStackOverflow = (fn: () => T, errorCallback: ( try { return fn(); } catch (error) { - if (isStackOverflowExeption(error)) { + if (isStackOverflowException(error)) { error = errorCallback(); } throw error;