@@ -60,7 +60,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
60
60
return [ [ node . qualifiedName , { node, id } ] ] ;
61
61
} ;
62
62
let symbolMapByQualifiedName = new Map < string , Qualified > (
63
- Object . keys ( api . symbolIdMap ) . map ( mapper ) . flat ( 1 )
63
+ Object . keys ( api . symbolIdMap ) . map ( mapper ) . flat ( 1 ) ,
64
64
) ;
65
65
66
66
function getSymbol ( qualifiedName : string ) {
@@ -85,29 +85,29 @@ export async function getReferenceAPI(repo: string, ref: string) {
85
85
}
86
86
if ( ! symbol ) {
87
87
symbol = symbolMapByQualifiedName . get (
88
- qualifiedName . replace ( / ^ ( u n s t a b l e | u n s a f e | i n t e r n a l ) _ / , "" )
88
+ qualifiedName . replace ( / ^ ( u n s t a b l e | u n s a f e | i n t e r n a l ) _ / , "" ) ,
89
89
) ;
90
90
}
91
91
return symbol ;
92
92
}
93
93
94
94
function getLink (
95
- _qualifiedName : string | number | JSONOutput . ReflectionSymbolId | undefined
95
+ _qualifiedName : string | number | JSONOutput . ReflectionSymbolId | undefined ,
96
96
) {
97
97
let qualifiedName =
98
98
( typeof _qualifiedName === "string"
99
99
? _qualifiedName
100
100
: typeof _qualifiedName === "number"
101
- ? api . symbolIdMap [ _qualifiedName ] . qualifiedName
102
- : _qualifiedName ?. qualifiedName ) ?? "" ;
101
+ ? api . symbolIdMap [ _qualifiedName ] . qualifiedName
102
+ : _qualifiedName ?. qualifiedName ) ?? "" ;
103
103
let symbol = getSymbol ( qualifiedName ) ;
104
104
if ( ! symbol ) {
105
105
// console.error("No symbol found for", qualifiedName);
106
106
return "#" ;
107
107
}
108
108
// find the package the qualifiedName belongs to
109
109
let pkg = api . children ?. find ( ( child ) =>
110
- child . children ?. some ( ( child ) => child . name === qualifiedName )
110
+ child . children ?. some ( ( child ) => child . name === qualifiedName ) ,
111
111
) ;
112
112
if ( ! pkg ) {
113
113
let split = qualifiedName . split ( "." ) ;
@@ -116,7 +116,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
116
116
popped . push ( split . pop ( ) ) ;
117
117
const splitName = split . join ( "." ) ;
118
118
pkg = api . children ?. find ( ( child ) =>
119
- child . children ?. some ( ( child ) => child . name === splitName )
119
+ child . children ?. some ( ( child ) => child . name === splitName ) ,
120
120
) ;
121
121
}
122
122
if ( pkg ) {
@@ -154,7 +154,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
154
154
async function getDoc (
155
155
pkgName : string ,
156
156
qualifiedName : string ,
157
- shouldProcessMarkdown = true
157
+ shouldProcessMarkdown = true ,
158
158
) : Promise < Doc | null > {
159
159
let pkg = getPackage ( pkgName ) ;
160
160
let symbol = getSymbol ( qualifiedName ) ;
@@ -165,17 +165,17 @@ export async function getReferenceAPI(repo: string, ref: string) {
165
165
pkg . children ?. find (
166
166
( child ) =>
167
167
child . name === "UNSAFE_" + qualifiedName ||
168
- child . name === "unsafe_" + qualifiedName
168
+ child . name === "unsafe_" + qualifiedName ,
169
169
) ||
170
170
pkg . children ?. find (
171
171
( child ) =>
172
172
child . name === "UNSTABLE_" + qualifiedName ||
173
- child . name === "unstable_" + qualifiedName
173
+ child . name === "unstable_" + qualifiedName ,
174
174
) ||
175
175
pkg . children ?. find (
176
176
( child ) =>
177
177
child . name === "INTERNAL_" + qualifiedName ||
178
- child . name === "internal_" + qualifiedName
178
+ child . name === "internal_" + qualifiedName ,
179
179
) ||
180
180
null ;
181
181
@@ -256,7 +256,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
256
256
}
257
257
258
258
function declarationToMarkdown (
259
- declaration : JSONOutput . DeclarationReflection
259
+ declaration : JSONOutput . DeclarationReflection ,
260
260
) {
261
261
let md = "" ;
262
262
switch ( declaration . kind ) {
@@ -409,7 +409,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
409
409
return `${ formatType ( type . elementType ) } []` ;
410
410
case "conditional" :
411
411
return `${ formatType ( type . checkType ) } ? ${ formatType (
412
- type . extendsType
412
+ type . extendsType ,
413
413
) } : ${ formatType ( type . falseType ) } `;
414
414
case "indexedAccess" :
415
415
return `${ formatType ( type . objectType ) } [${ formatType ( type . indexType ) } ]` ;
@@ -426,7 +426,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
426
426
return JSON . stringify ( type . value ) ;
427
427
case "mapped" :
428
428
return `{ [${ type . parameter } in ${ formatType (
429
- type . parameterType
429
+ type . parameterType ,
430
430
) } ]: ${ formatType ( type . templateType ) } }`;
431
431
case "namedTupleMember" :
432
432
return `${ type . name } : ${ formatType ( type . element ) } ` ;
@@ -471,7 +471,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
471
471
function formatTypeDeclaration (
472
472
declaration :
473
473
| JSONOutput . ReferenceReflection
474
- | JSONOutput . DeclarationReflection
474
+ | JSONOutput . DeclarationReflection ,
475
475
) {
476
476
let formatted = "{ " ;
477
477
if ( declaration . children ) {
@@ -487,7 +487,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
487
487
}
488
488
489
489
function formatSignature (
490
- sig : JSONOutput . SignatureReflection | JSONOutput . TypeParameterReflection
490
+ sig : JSONOutput . SignatureReflection | JSONOutput . TypeParameterReflection ,
491
491
) {
492
492
switch ( sig . kind ) {
493
493
case ReflectionKind . CallSignature : {
@@ -534,7 +534,7 @@ export async function getReferenceAPI(repo: string, ref: string) {
534
534
}
535
535
536
536
function inlineTagToMarkdown (
537
- inlineTag : JSONOutput . InlineTagDisplayPart
537
+ inlineTag : JSONOutput . InlineTagDisplayPart ,
538
538
) : string {
539
539
switch ( inlineTag . tag ) {
540
540
case "@link" :
0 commit comments