File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
packages/compiler-cli/src/ngtsc/docs/src Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,10 @@ class ClassExtractor {
110110 protected extractClassMember ( memberDeclaration : MemberElement ) : MemberEntry | undefined {
111111 if ( this . isMethod ( memberDeclaration ) ) {
112112 return this . extractMethod ( memberDeclaration ) ;
113- } else if ( this . isProperty ( memberDeclaration ) ) {
113+ } else if (
114+ this . isProperty ( memberDeclaration ) &&
115+ ! this . hasPrivateComputedProperty ( memberDeclaration )
116+ ) {
114117 return this . extractClassProperty ( memberDeclaration ) ;
115118 } else if ( ts . isAccessor ( memberDeclaration ) ) {
116119 return this . extractGetterSetter ( memberDeclaration ) ;
@@ -375,6 +378,17 @@ class ClassExtractor {
375378 const modifiers = this . declaration . modifiers ?? [ ] ;
376379 return modifiers . some ( ( mod ) => mod . kind === ts . SyntaxKind . AbstractKeyword ) ;
377380 }
381+
382+ /**
383+ * Check wether a member has a private computed property name like [ɵWRITABLE_SIGNAL]
384+ *
385+ * This will prevent exposing private computed properties in the docs.
386+ */
387+ private hasPrivateComputedProperty ( property : PropertyLike ) {
388+ return (
389+ ts . isComputedPropertyName ( property . name ) && property . name . expression . getText ( ) . startsWith ( 'ɵ' )
390+ ) ;
391+ }
378392}
379393
380394/** Extractor to pull info for API reference documentation for an Angular directive. */
You can’t perform that action at this time.
0 commit comments