Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 697681766
  • Loading branch information
concavelenz authored and copybara-github committed Nov 18, 2024
1 parent d1e16b9 commit 4713b75
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
4 changes: 0 additions & 4 deletions src/com/google/javascript/jscomp/PolymerClassRewriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -831,10 +831,6 @@ private void appendBehaviorMembersToBlock(final PolymerClassDefinition cls, Node

JSDocInfo.Builder info = getJSDocInfoBuilderForBehavior(behavior, behaviorFunction);

// Uses of private members that come from behaviors are not recognized correctly,
// so just suppress that warning.
info.recordSuppression("unusedPrivateMembers");

// If the function in the behavior is @protected, switch it to @public so that
// we don't get a visibility warning. This is a bit of a hack but easier than
// making the type system understand that methods are "inherited" from behaviors.
Expand Down
24 changes: 1 addition & 23 deletions test/com/google/javascript/jscomp/PolymerPassTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,6 @@ public void testArrowFunctionDefinitionInIifeBehavior() {
" */",
"es6.Test = function() {};",
"/**",
" * @suppress {unusedPrivateMembers}",
" * @return {?}",
" */",
"es6.Test.prototype.sayHi = () => void 0;",
Expand Down Expand Up @@ -2378,7 +2377,6 @@ public void testSimpleBehavior() {
"A.prototype.name;",
"/**",
" * @param {string} funAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingFun = function(funAmount) {",
" alert('Something ' + funAmount + ' fun!');",
Expand Down Expand Up @@ -2504,7 +2502,6 @@ public void testBehaviorWithProtectedMethod() {
"",
"/**",
" * @public",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingFun = function(){};",
"",
Expand Down Expand Up @@ -2815,21 +2812,18 @@ public void testArrayBehavior() {
"A.prototype.name;",
"/**",
" * @param {string} funAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingFun = function(funAmount) {",
" alert('Something ' + funAmount + ' fun!');",
"};",
"/**",
" * @param {number} radAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingRad = function(radAmount) {",
" alert('Something ' + radAmount + ' rad!');",
"};",
"/**",
" * @param {boolean} boredYet",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomething = function(boredYet) {",
" alert(boredYet + ' ' + this.boringString);",
Expand Down Expand Up @@ -2921,14 +2915,12 @@ public void testInlineLiteralBehavior() {
"A.prototype.name;",
"/**",
" * @param {string} funAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingFun = function(funAmount) {",
" alert('Something ' + funAmount + ' fun!');",
"};",
"/**",
" * @param {number} radAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingRad = function(radAmount) {",
" alert('Something ' + radAmount + ' rad!');",
Expand Down Expand Up @@ -3110,7 +3102,6 @@ public void testBehaviorFunctionOverriding() {
"A.prototype.name;",
"/**",
" * @param {boolean} boredYet",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomething = function(boredYet) {",
" alert(boredYet + ' ' + this.boringString);",
Expand Down Expand Up @@ -3220,7 +3211,6 @@ public void testBehaviorShorthandFunctionOverriding() {
"A.prototype.name;",
"/**",
" * @param {boolean} boredYet",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomething = function(boredYet) {",
" alert(boredYet + ' ' + this.boringString);",
Expand Down Expand Up @@ -3298,7 +3288,6 @@ public void testBehaviorReadOnlyProp() {
"A.prototype.name;",
"/**",
" * @param {string} funAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingFun = function(funAmount) {",
" alert('Something ' + funAmount + ' fun!');",
Expand Down Expand Up @@ -3415,7 +3404,6 @@ public void testBehaviorInIIFE() {
"A.prototype.name;",
"/**",
" * @param {string} funAmount",
" * @suppress {unusedPrivateMembers}",
" * @return {?}",
" */",
"A.prototype.doSomethingFun = function(funAmount) {};",
Expand Down Expand Up @@ -3585,19 +3573,16 @@ public void testBehaviorInModule() {
"/** @type {string} */ A.prototype.name;",
"/**",
" * @param {string} funAmount",
" * @suppress {unusedPrivateMembers}",
" * @return {?}",
" */",
"A.prototype.doSomethingFun = function(funAmount) {};",
"/**",
" * @suppress {unusedPrivateMembers}",
" * @return {?}",
" */",
"A.prototype.doSomethingVeryFun =",
" function(a, param$polymer$1, c, veryFun = void 0) {};",
"/**",
" * @param {string} coolAmount",
" * @suppress {unusedPrivateMembers}",
" * @return {?}",
" */",
"A.prototype.doSomethingCool = function(coolAmount) {};",
Expand Down Expand Up @@ -3670,7 +3655,6 @@ public void testBehaviorInModule_destructuringRestParams() {
"var A = function() {};",
"/** @type {string} */ A.prototype.name;",
"/**",
" * @suppress {unusedPrivateMembers}",
" * @return {?}",
" */",
"A.prototype.doSomethingCool =",
Expand Down Expand Up @@ -3760,14 +3744,12 @@ public void testDuplicatedBehaviorsAreCopiedOnce() {
"A.prototype.name;",
"/**",
" * @param {number} radAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingRad = function(radAmount) {",
" alert('Something ' + radAmount + ' rad!');",
"};",
"/**",
" * @param {string} funAmount",
" * @suppress {unusedPrivateMembers}",
" */",
"A.prototype.doSomethingFun = function(funAmount) {",
" alert('Something ' + funAmount + ' fun!');",
Expand Down Expand Up @@ -4582,11 +4564,10 @@ public void testExportsUniqueMethodsFromLegacyElementAndBehaviors() {
"var TestElementElement = function() {};",
"/**",
" * @public",
" * @suppress {unusedPrivateMembers}",
" * @return {void}",
" */",
"TestElementElement.prototype.onBehavior1 = function() {};",
"/** @private @suppress {unusedPrivateMembers} */",
"/** @private */",
"TestElementElement.prototype.onBehavior2 = function() {};",
"Polymer(/** @lends {TestElementElement.prototype} */ {",
" is: \"test-element\",",
Expand Down Expand Up @@ -5262,9 +5243,6 @@ public void testPolyerObjectPropertiesAccessedBeforeDefinition() {
"}",
"/** @type {boolean} */ ",
"PtTestComponentElement.prototype.disabled;",
"/**",
" * @suppress {unusedPrivateMembers}",
" */",
"PtTestComponentElement.prototype._abc = function() {",
" if (true) {",
" }",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ public void testTSVariableReassignmentAndAliasingDueToDecoration() {
" * @suppress {missingRequire} added by tsickle",
" * @suppress {uselessCode} added by tsickle",
" * @suppress {missingReturn} added by tsickle",
" * @suppress {unusedPrivateMembers} added by tsickle",
" * @suppress {missingOverride} added by tsickle",
" * @suppress {const} added by tsickle",
" */",
Expand Down

0 comments on commit 4713b75

Please sign in to comment.