Skip to content

Commit

Permalink
Fix typo in canIncludeBindAndCheckDiagnostics (#58840)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabritto authored Jun 12, 2024
1 parent d8086f1 commit 346df34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import {
canHaveModifiers,
canHaveModuleSpecifier,
canHaveSymbol,
canIncludeBindAndCheckDiagnsotics,
canIncludeBindAndCheckDiagnostics,
canUsePropertyAccess,
cartesianProduct,
CaseBlock,
Expand Down Expand Up @@ -49205,7 +49205,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}

function calculateNodeCheckFlagWorker(node: Node, flag: LazyNodeCheckFlags) {
if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnsotics(getSourceFileOfNode(node), compilerOptions)) {
if (!compilerOptions.noCheck && canIncludeBindAndCheckDiagnostics(getSourceFileOfNode(node), compilerOptions)) {
// Unless noCheck is passed, assume calculation of node check flags has been done eagerly.
// This saves needing to mark up where in the eager traversal certain results are "done",
// just to reconcile the eager and lazy results. This wouldn't be hard if an eager typecheck
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
CallExpression,
CallSignatureDeclaration,
canHaveLocals,
canIncludeBindAndCheckDiagnsotics,
canIncludeBindAndCheckDiagnostics,
CaseBlock,
CaseClause,
CaseOrDefaultClause,
Expand Down Expand Up @@ -811,7 +811,7 @@ export function emitFiles(
sourceFile => {
if (
compilerOptions.noCheck ||
!canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)
!canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)
) markLinkedReferences(sourceFile);
},
);
Expand Down Expand Up @@ -878,7 +878,7 @@ export function emitFiles(
(emitOnly && !getEmitDeclarations(compilerOptions)) ||
compilerOptions.noCheck ||
emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) ||
!canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)
!canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)
) {
collectLinkedAliases(sourceFile);
}
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10116,11 +10116,11 @@ export function skipTypeChecking(sourceFile: SourceFile, options: CompilerOption
options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib) ||
options.noCheck ||
host.isSourceOfProjectReferenceRedirect(sourceFile.fileName) ||
!canIncludeBindAndCheckDiagnsotics(sourceFile, options);
!canIncludeBindAndCheckDiagnostics(sourceFile, options);
}

/** @internal */
export function canIncludeBindAndCheckDiagnsotics(sourceFile: SourceFile, options: CompilerOptions) {
export function canIncludeBindAndCheckDiagnostics(sourceFile: SourceFile, options: CompilerOptions) {
if (!!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false) return false;
if (
sourceFile.scriptKind === ScriptKind.TS ||
Expand Down

0 comments on commit 346df34

Please sign in to comment.