1+ import type { ExportBit , ParsedTSFile } from '../types'
12import type { TSDocParser } from '@microsoft/tsdoc'
2- import type { Bit , ParsedTSFile } from '../types'
33import type { SourceFile } from 'ts-morph'
44
55import { parseCommentFromNode } from '../comments'
66import { getType } from '../utils/nodes'
77import ts from 'typescript'
88
99export function parseTSFile ( file_name : string , file : SourceFile , tsdoc : TSDocParser ) : ParsedTSFile {
10- const export_bits : Bit [ ] = [ ]
10+ const export_bits : ExportBit [ ] = [ ]
1111
1212 //? Loop over all the export declarations
1313 for ( const [ name , declarations ] of file . getExportedDeclarations ( ) ) {
@@ -18,7 +18,6 @@ export function parseTSFile(file_name: string, file: SourceFile, tsdoc: TSDocPar
1818 )
1919 }
2020
21- //? Let's only deal with a single array cast
2221 const [ declaration ] = declarations
2322
2423 const tsdoc_node_parent = declaration . getFirstChildIfKind ( ts . SyntaxKind . JSDoc )
@@ -32,6 +31,7 @@ export function parseTSFile(file_name: string, file: SourceFile, tsdoc: TSDocPar
3231 export_bits . push ( {
3332 name,
3433 type : getType ( declaration ) ,
34+ isDefaultExport : name == 'default' ,
3535 comment : tsdoc_node_parent ? parseCommentFromNode ( tsdoc_node_parent , tsdoc ) : undefined ,
3636 } )
3737 }
0 commit comments