Skip to content

Commit 46be74e

Browse files
committed
fix: Detect visibility modifiers on accessors
Resolves TypeStrong#1516
1 parent adfa846 commit 46be74e

File tree

4 files changed

+862
-793
lines changed

4 files changed

+862
-793
lines changed

src/lib/converter/symbols.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,11 @@ function convertAccessor(
849849
);
850850
const rc = context.withScope(reflection);
851851

852+
const declaration = symbol.getDeclarations()?.[0];
853+
if (declaration) {
854+
setModifiers(symbol, declaration, reflection);
855+
}
856+
852857
const getDeclaration = symbol.getDeclarations()?.find(ts.isGetAccessor);
853858
if (getDeclaration) {
854859
const signature = context.checker.getSignatureFromDeclaration(

src/test/converter/class/access.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ export class PrivateClass {
5555

5656
/** @hidden - should not show up */
5757
constructor() {}
58+
59+
private static get privateStaticGetter() {
60+
return 1;
61+
}
5862
}

0 commit comments

Comments
 (0)