Skip to content

Commit

Permalink
fix: Detect visibility modifiers on accessors
Browse files Browse the repository at this point in the history
Resolves #1516
  • Loading branch information
Gerrit0 committed Feb 23, 2021
1 parent adfa846 commit 46be74e
Show file tree
Hide file tree
Showing 4 changed files with 862 additions and 793 deletions.
5 changes: 5 additions & 0 deletions src/lib/converter/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,11 @@ function convertAccessor(
);
const rc = context.withScope(reflection);

const declaration = symbol.getDeclarations()?.[0];
if (declaration) {
setModifiers(symbol, declaration, reflection);
}

const getDeclaration = symbol.getDeclarations()?.find(ts.isGetAccessor);
if (getDeclaration) {
const signature = context.checker.getSignatureFromDeclaration(
Expand Down
4 changes: 4 additions & 0 deletions src/test/converter/class/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ export class PrivateClass {

/** @hidden - should not show up */
constructor() {}

private static get privateStaticGetter() {
return 1;
}
}
Loading

0 comments on commit 46be74e

Please sign in to comment.