mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 22:51:17 -05:00
Add a comment to clarify the #private field (#41547)
* add a comment to clarify the #private field * small fix
This commit is contained in:
committed by
GitHub
parent
d163ab67c8
commit
d338c20c15
@@ -1372,6 +1372,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
const hasPrivateIdentifier = some(input.members, member => !!member.name && isPrivateIdentifier(member.name));
|
||||
// When the class has at least one private identifier, create a unique constant identifier to retain the nominal typing behavior
|
||||
// Prevents other classes with the same public members from being used in place of the current class
|
||||
const privateIdentifier = hasPrivateIdentifier ? [
|
||||
factory.createPropertyDeclaration(
|
||||
/*decorators*/ undefined,
|
||||
|
||||
Reference in New Issue
Block a user