Skip to content

Commit d86d80f

Browse files
committed
fix(typedoc): Exclude more types for base props.
1 parent 62ac4a1 commit d86d80f

File tree

1 file changed

+5
-2
lines changed
  • plugins/typedoc-plugin-react-components/src

1 file changed

+5
-2
lines changed

plugins/typedoc-plugin-react-components/src/main.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import {
1919
} from 'typedoc';
2020
import ts, { ModifierFlags, SymbolFlags } from 'typescript';
2121

22+
const excludeBaseTypes = ['LitElement', 'HTMLElement'];
23+
2224
export function load(app: Application) {
2325
app.converter.on(
2426
Converter.EVENT_CREATE_DECLARATION,
@@ -153,10 +155,11 @@ export function load(app: Application) {
153155
}
154156

155157
function parseTypeProperties(type: any, context: any) {
156-
if (type.symbol?.name === 'LitElement') {
158+
if (excludeBaseTypes.includes(type.symbol?.name)) {
157159
return;
158160
}
159-
type.declaredProperties?.forEach((value: ts.Symbol, key: ts.__String) => {
161+
const props = type.declaredProperties || type.symbol?.members;
162+
props?.forEach((value: ts.Symbol, key: ts.__String) => {
160163
const memberDeclaration = value?.declarations?.length ? (value.declarations[0] as any) : null;
161164
const modifiers = ts.getCombinedModifierFlags(memberDeclaration);
162165
if (

0 commit comments

Comments
 (0)