File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
tooling/api-documenter/src Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @livekit/api-documenter " : patch
3+ ---
4+
5+ fix(docs-gen): drop non default overloads from docs
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ import {
7272 getCategorySubfolder ,
7373 getFunctionType ,
7474 getLinkToSourceOnGitHub ,
75+ isNonDefaultOverload ,
7576} from '../livekitUtils/classifiers' ;
7677import { MarkDocTag } from '../nodes/MarkDocTag' ;
7778import { ParameterList } from '../nodes/ParameterList' ;
@@ -137,6 +138,11 @@ export class MarkdownDocumenter {
137138 const output : DocSection = new DocSection ( { configuration } ) ;
138139 const category : LkType = getFunctionType ( apiItem ) ;
139140
141+ if ( isNonDefaultOverload ( apiItem ) ) {
142+ console . log ( 'isNonDefaultOverload' , apiItem . displayName ) ;
143+ return ;
144+ }
145+
140146 // this._writeBreadcrumb(output, apiItem);
141147
142148 const scopedName : string = apiItem . getScopedNameWithinPackage ( ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ function isPrefab(apiItem: ApiItem): boolean {
1919 return false ;
2020}
2121
22+ export function isNonDefaultOverload ( apiItem : ApiItem ) : boolean {
23+ if ( apiItem instanceof ApiFunction ) {
24+ return apiItem . overloadIndex !== undefined && apiItem . overloadIndex > 1 ;
25+ }
26+ return false ;
27+ }
28+
2229function isConstDeclarationComponent ( apiItem : ApiItem ) : boolean {
2330 return (
2431 apiItem instanceof ApiVariable &&
You can’t perform that action at this time.
0 commit comments