Skip to content

Fix (cosmetic) typos in checker.ts comments #38576

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

Merged
merged 1 commit into from
May 14, 2020
Merged
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
6 changes: 3 additions & 3 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7594,7 +7594,7 @@ namespace ts {

if (isPropertyDeclaration(declaration) && (noImplicitAny || isInJSFile(declaration))) {
// We have a property declaration with no type annotation or initializer, in noImplicitAny mode or a .js file.
// Use control flow analysis of this.xxx assignments the constructor to determine the type of the property.
// Use control flow analysis of this.xxx assignments in the constructor to determine the type of the property.
const constructor = findConstructorDeclaration(declaration.parent);
const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) :
getEffectiveModifierFlags(declaration) & ModifierFlags.Ambient ? getTypeOfPropertyInBaseClass(declaration.symbol) :
Expand All @@ -7619,7 +7619,7 @@ namespace ts {
}

function isConstructorDeclaredProperty(symbol: Symbol) {
// A propery is considered a constructor declared property when all declaration sites are this.xxx assignments,
// A property is considered a constructor declared property when all declaration sites are this.xxx assignments,
// when no declaration sites have JSDoc type annotations, and when at least one declaration site is in the body of
// a class constructor.
if (symbol.valueDeclaration && isBinaryExpression(symbol.valueDeclaration)) {
Expand Down Expand Up @@ -10562,7 +10562,7 @@ namespace ts {
// Since getApparentType may return a non-reduced union or intersection type, we need to perform
// type reduction both before and after obtaining the apparent type. For example, given a type parameter
// 'T extends A | B', the type 'T & X' becomes 'A & X | B & X' after obtaining the apparent type, and
// that type may need futher reduction to remove empty intersections.
// that type may need further reduction to remove empty intersections.
return getReducedType(getApparentType(getReducedType(type)));
}

Expand Down