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

fix: spelling error #1560

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
"--nolazy"
],
"console": "internalConsole",
},
{
"name": "Debug Current TS file",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": [
"--nolazy", "-r", "ts-node/register/transpile-only"
],
"program": "${file}",
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart",
}
]
}
4 changes: 2 additions & 2 deletions src/planning/planner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -236,7 +236,7 @@ function plan(
return context;
} catch (error) {
if (
isStackOverflowExeption(error)
isStackOverflowException(error)
) {
circularDependencyToException(context.plan.rootRequest);
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/exceptions.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,7 +11,7 @@ export const tryAndThrowErrorIfStackOverflow = <T>(fn: () => T, errorCallback: (
try {
return fn();
} catch (error) {
if (isStackOverflowExeption(error)) {
if (isStackOverflowException(error)) {
error = errorCallback();
}
throw error;
Expand Down