Skip to content

fix typo #46302

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

Closed
wants to merge 1 commit into from
Closed

fix typo #46302

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
17 changes: 8 additions & 9 deletions src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ namespace ts.Completions {
case SyntaxKind.Identifier:
isJsxIdentifierExpected = true;
// For `<div x=[|f/**/|]`, `parent` will be `x` and `previousToken.parent` will be `f` (which is its own JsxAttribute)
// Note for `<div someBool f>` we don't want to treat this as a jsx inializer, instead it's the attribute name.
// Note for `<div someBool f>` we don't want to treat this as a jsx initializer, instead it's the attribute name.
if (parent !== previousToken.parent &&
!(parent as JsxAttribute).initializer &&
findChildOfKind(parent, SyntaxKind.EqualsToken, sourceFile)) {
Expand Down Expand Up @@ -1698,7 +1698,7 @@ namespace ts.Completions {
}
}

// If the module is merged with a value, we must get the type of the class and add its propertes (for inherited static methods).
// If the module is merged with a value, we must get the type of the class and add its properties (for inherited static methods).
if (!isTypeLocation &&
symbol.declarations &&
symbol.declarations.some(d => d.kind !== SyntaxKind.SourceFile && d.kind !== SyntaxKind.ModuleDeclaration && d.kind !== SyntaxKind.EnumDeclaration)) {
Expand Down Expand Up @@ -2796,9 +2796,9 @@ namespace ts.Completions {
return false; // Don't block completions.
}

const ancestorPropertyDeclaraion = getAncestor(contextToken.parent, SyntaxKind.PropertyDeclaration);
const ancestorPropertyDeclaration = getAncestor(contextToken.parent, SyntaxKind.PropertyDeclaration);
// If we are inside a class declaration and typing `constructor` after property declaration...
if (ancestorPropertyDeclaraion
if (ancestorPropertyDeclaration
&& contextToken !== previousToken
&& isClassLike(previousToken.parent.parent)
// And the cursor is at the token...
Expand All @@ -2810,8 +2810,8 @@ namespace ts.Completions {
else if (contextToken.kind !== SyntaxKind.EqualsToken
// Should not block: `class C { blah = c/**/ }`
// But should block: `class C { blah = somewhat c/**/ }` and `class C { blah: SomeType c/**/ }`
&& (isInitializedProperty(ancestorPropertyDeclaraion as PropertyDeclaration)
|| hasType(ancestorPropertyDeclaraion))) {
&& (isInitializedProperty(ancestorPropertyDeclaration as PropertyDeclaration)
|| hasType(ancestorPropertyDeclaration))) {
return true;
}
}
Expand Down Expand Up @@ -2945,7 +2945,7 @@ namespace ts.Completions {
/**
* Filters out completion suggestions for class elements.
*
* @returns Symbols to be suggested in an class element depending on existing memebers and symbol flags
* @returns Symbols to be suggested in an class element depending on existing members and symbol flags
*/
function filterClassMembersList(baseSymbols: readonly Symbol[], existingMembers: readonly ClassElement[], currentClassElementModifierFlags: ModifierFlags): Symbol[] {
const existingMemberNames = new Set<__String>();
Expand Down Expand Up @@ -3548,7 +3548,7 @@ namespace ts.Completions {

/**
* True if the first character of `lowercaseCharacters` is the first character
* of some "word" in `identiferString` (where the string is split into "words"
* of some "word" in `identifierString` (where the string is split into "words"
* by camelCase and snake_case segments), then if the remaining characters of
* `lowercaseCharacters` appear, in order, in the rest of `identifierString`.
*
Expand Down Expand Up @@ -3600,4 +3600,3 @@ namespace ts.Completions {
return charCode;
}
}

2 changes: 1 addition & 1 deletion src/services/findAllReferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ namespace ts.FindAllReferences {
function forEachRelatedSymbol<T>(
symbol: Symbol, location: Node, checker: TypeChecker, isForRenamePopulateSearchSymbolSet: boolean, onlyIncludeBindingElementAtReferenceLocation: boolean,
/**
* @param baseSymbol This symbol means one property/mehtod from base class or interface when it is not null or undefined,
* @param baseSymbol This symbol means one property/method from base class or interface when it is not null or undefined,
*/
cbSymbol: (symbol: Symbol, rootSymbol?: Symbol, baseSymbol?: Symbol, kind?: NodeEntryKind) => T | undefined,
allowBaseTypes: (rootSymbol: Symbol) => boolean,
Expand Down
2 changes: 1 addition & 1 deletion src/services/stringCompletions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ namespace ts.Completions.StringCompletions {
/**
* Check all of the declared modules and those in node modules. Possible sources of modules:
* Modules that are found by the type checker
* Modules found relative to "baseUrl" compliler options (including patterns from "paths" compiler option)
* Modules found relative to "baseUrl" compiler options (including patterns from "paths" compiler option)
* Modules from node_modules (i.e. those listed in package.json)
* This includes all files that are found in node_modules/moduleName/ with acceptable file extensions
*/
Expand Down