Fix typo in `canIncludeBindAndCheckDiagnostics` (#58840)

This commit is contained in:
Gabriela Araujo Britto 2024-06-12 13:01:08 -07:00 коммит произвёл GitHub
Родитель d8086f14b6
Коммит 346df34b17
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -62,7 +62,7 @@ import {
canHaveModifiers,
canHaveModuleSpecifier,
canHaveSymbol,
canIncludeBindAndCheckDiagnsotics,
canIncludeBindAndCheckDiagnostics,
canUsePropertyAccess,
cartesianProduct,
CaseBlock,
@ -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

Просмотреть файл

@ -21,7 +21,7 @@ import {
CallExpression,
CallSignatureDeclaration,
canHaveLocals,
canIncludeBindAndCheckDiagnsotics,
canIncludeBindAndCheckDiagnostics,
CaseBlock,
CaseClause,
CaseOrDefaultClause,
@ -811,7 +811,7 @@ export function emitFiles(
sourceFile => {
if (
compilerOptions.noCheck ||
!canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)
!canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)
) markLinkedReferences(sourceFile);
},
);
@ -878,7 +878,7 @@ export function emitFiles(
(emitOnly && !getEmitDeclarations(compilerOptions)) ||
compilerOptions.noCheck ||
emitResolverSkipsTypeChecking(emitOnly, forceDtsEmit) ||
!canIncludeBindAndCheckDiagnsotics(sourceFile, compilerOptions)
!canIncludeBindAndCheckDiagnostics(sourceFile, compilerOptions)
) {
collectLinkedAliases(sourceFile);
}

Просмотреть файл

@ -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 ||