@@ -106,9 +106,7 @@ export class ApiDocsTransformer {
106106 symbolMap : SymbolMap ;
107107 pages : Pages ;
108108 } > {
109- this . addKindStringsBackToAllNodes (
110- this . project as unknown as Record < string , unknown >
111- ) ;
109+ this . addKindStringsBackToAllNodes ( this . project ) ;
112110 // In the first pass, determine the page/anchor where each node should
113111 // appear in our layout, and index all nodes by TypeDoc numeric ID.
114112 for ( const entrypoint of this . project . children ?? [ ] ) {
@@ -694,7 +692,7 @@ export class ApiDocsTransformer {
694692 * api.html. This method recursively walks the TypeDoc node and adds
695693 * `kindString` back to all nodes with a valid `kind` field.
696694 */
697- private addKindStringsBackToAllNodes ( node : Record < string , unknown > ) {
695+ private addKindStringsBackToAllNodes ( node : unknown ) {
698696 if ( typeof node !== 'object' || node == null ) {
699697 return ;
700698 }
@@ -707,11 +705,10 @@ export class ApiDocsTransformer {
707705 for ( const [ key , val ] of Object . entries ( node ) ) {
708706 if ( key === 'kind' && typeof val === 'number' ) {
709707 // Add a `kindString` field to the node.
710- node [ 'kindString' ] = typedoc . ReflectionKind . singularString (
711- val as ReflectionKind
712- ) ;
708+ ( node as { kindString : string } ) [ 'kindString' ] =
709+ typedoc . ReflectionKind . singularString ( val as ReflectionKind ) ;
713710 }
714- this . addKindStringsBackToAllNodes ( val as Record < string , unknown > ) ;
711+ this . addKindStringsBackToAllNodes ( val ) ;
715712 }
716713 }
717714
0 commit comments