File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export function natspec({ item }: DocItemContext): NatSpec {
20
20
21
21
export function name ( { item } : DocItemContext , original ?: unknown ) : string {
22
22
if ( item . nodeType === 'FunctionDefinition' ) {
23
- return item . kind === 'function' ? original as string : item . kind ;
23
+ return typeof ( original ) === 'string' && original !== '' ? original : item . kind ;
24
24
} else {
25
25
return original as string ;
26
26
}
@@ -43,7 +43,7 @@ export function signature({ item }: DocItemContext): string | undefined {
43
43
const { kind, name } = item ;
44
44
const params = item . parameters . parameters ;
45
45
const returns = item . returnParameters . parameters ;
46
- const head = ( kind === 'function' || kind === 'freeFunction' ) ? [ kind , name ] . join ( ' ' ) : kind ;
46
+ const head = ( kind === 'function' || kind === 'freeFunction' ) ? `function ${ name } ` : kind ;
47
47
let res = [
48
48
`${ head } (${ params . map ( formatVariable ) . join ( ', ' ) } )` ,
49
49
item . visibility ,
You can’t perform that action at this time.
0 commit comments