@@ -338,7 +338,7 @@ function renderInterfaces(module: TypeDoc.DeclarationReflection) {
338338 `**Type** ${ renderSignatureAsType ( m . signatures ! [ 0 ] ) } ` ,
339339 `</InlineSection>` ,
340340 `</Section>` ,
341- renderComment ( m . comment ) ,
341+ renderComment ( m . signatures ! [ 0 ] . comment ) ,
342342 `</Segment>` ,
343343 ] ) ,
344344 ]
@@ -434,7 +434,7 @@ function renderType(type: TypeDoc.SomeType): Text {
434434 type . type === "reflection" &&
435435 type . declaration . kind === TypeDoc . ReflectionKind . TypeLiteral
436436 ) {
437- return `<code class="primitive">object type</code>`
437+ return renderCallbackType ( type )
438438 }
439439 return `<code class="primitive">${ type . type } </code>`
440440
@@ -502,6 +502,10 @@ function renderType(type: TypeDoc.SomeType): Text {
502502 ) } <code class="symbol">)[]</code>`
503503 : `${ renderType ( type . elementType ) } <code class="symbol">[]</code>`
504504 }
505+ function renderCallbackType ( type : TypeDoc . ReflectionType ) {
506+ // return renderSignatureAsType(type.declaration.signatures![0])
507+ return `<code class="primitive">object type</code>`
508+ }
505509 function renderTypescriptType ( type : TypeDoc . ReferenceType ) {
506510 // ie. Record<string, string>
507511 return [
@@ -517,10 +521,20 @@ function renderType(type: TypeDoc.SomeType): Text {
517521
518522 if ( type . reflection ?. kind === TypeDoc . ReflectionKind . Class ) {
519523 const r = type . reflection as TypeDoc . DeclarationReflection
520- if ( r . sources ?. [ 0 ] ?. fileName . endsWith ( "error.ts" ) ) {
524+ if ( r . sources ?. [ 0 ] ?. fileName . endsWith ( "error.ts" ) )
521525 return `[<code class="type">${ r . name } </code>](/docs/authorizer#${ r . name . toLowerCase ( ) } )`
526+ }
527+
528+ if ( type . reflection ?. kind === TypeDoc . ReflectionKind . Interface ) {
529+ const r = type . reflection as TypeDoc . DeclarationReflection
530+ if (
531+ r . sources ?. [ 0 ] ?. fileName . startsWith ( "packages/openauth/src/adapter/" )
532+ ) {
533+ const adapter = r . sources ?. [ 0 ] ?. fileName . split ( "/" ) . pop ( ) ?. split ( "." ) [ 0 ]
534+ return `[<code class="type">${ r . name } </code>](/docs/adapter/${ adapter } #${ r . name . toLowerCase ( ) } )`
522535 }
523536 }
537+
524538 return `[<code class="type">${ type . name } </code>](#${ type . name . toLowerCase ( ) } )`
525539 }
526540}
@@ -643,6 +657,7 @@ async function build() {
643657 entryPoints : [
644658 "../packages/openauth/src/adapter/apple.ts" ,
645659 "../packages/openauth/src/adapter/google.ts" ,
660+ "../packages/openauth/src/adapter/password.ts" ,
646661 "../packages/openauth/src/session.ts" ,
647662 "../packages/openauth/src/ui/theme.ts" ,
648663 "../packages/openauth/src/ui/code.tsx" ,
0 commit comments