Add a comment to clarify the #private field (#41547)

* add a comment to clarify the #private field

* small fix
This commit is contained in:
Guerric Phalippou
2020-11-24 07:34:27 +01:00
committed by GitHub
parent d163ab67c8
commit d338c20c15

View File

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