Content-Length: 278710 | pFad | http://github.com/microsoft/TypeScript/pull/62300/commits/de914f6a47826470fdb73635f782f09a75d86d35

2B Consistently error on attempts to access private properties on generic objects by Andarist · Pull Request #62300 · microsoft/TypeScript · GitHub
Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
only report the error on IndexedAccessType nodes
  • Loading branch information
Andarist committed Aug 18, 2025
commit de914f6a47826470fdb73635f782f09a75d86d35
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19584,7 +19584,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (objectType === wildcardType || indexType === wildcardType) {
return wildcardType;
}
if (isGenericObjectType(objectType)) {
if (accessNode?.kind === SyntaxKind.IndexedAccessType && isGenericObjectType(objectType)) {
const propertyName = getPropertyNameFromIndex(indexType, accessNode);
if (propertyName) {
if (someType(getApparentType(objectType), t => isNonPublicPropertyOfType(t, propertyName))) {
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/microsoft/TypeScript/pull/62300/commits/de914f6a47826470fdb73635f782f09a75d86d35

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy